Lines Matching refs:size

73 #define MALLOC_SIZE(size)	((size) == 0 ? 1 : (size))  argument
94 sm_malloc_x(size) in sm_malloc_x() argument
95 size_t size; in sm_malloc_x()
100 ptr = malloc(MALLOC_SIZE(size));
120 sm_malloc(size) in sm_malloc() argument
121 size_t size; in sm_malloc()
126 ptr = malloc(MALLOC_SIZE(size));
143 sm_realloc(ptr, size) in sm_realloc() argument
145 size_t size;
150 newptr = realloc(ptr, MALLOC_SIZE(size));
170 sm_realloc_x(ptr, size) in sm_realloc_x() argument
172 size_t size;
177 newptr = realloc(ptr, MALLOC_SIZE(size));
359 sm_malloc_tagged(size, tag, num, group) in sm_malloc_tagged() argument
360 size_t size; in sm_malloc_tagged()
370 ptr = malloc(MALLOC_SIZE(size));
378 && sm_debug_level(&SmHeapLimit) < SmHeapTotal + size)
381 ptr = malloc(MALLOC_SIZE(size));
383 if (ptr != NULL && !sm_heap_register(ptr, size, tag, num, group))
390 SmHeapTotal += size;
413 sm_malloc_tagged_x(size, tag, num, group) in sm_malloc_tagged_x() argument
414 size_t size; in sm_malloc_tagged_x()
424 ptr = malloc(MALLOC_SIZE(size));
433 && sm_debug_level(&SmHeapLimit) < SmHeapTotal + size)
438 ptr = malloc(MALLOC_SIZE(size));
440 if (ptr != NULL && !sm_heap_register(ptr, size, tag, num, group))
449 SmHeapTotal += size;
470 sm_heap_register(ptr, size, tag, num, group) in sm_heap_register() argument
472 size_t size;
503 hi->hi_size = size;
523 sm_realloc(ptr, size) in sm_realloc() argument
525 size_t size;
533 newptr = realloc(ptr, MALLOC_SIZE(size));
539 return sm_malloc_tagged(size, "realloc", 0, SmHeapGroup);
550 < SmHeapTotal - hi->hi_size + size)
555 newptr = realloc(ptr, MALLOC_SIZE(size));
559 SmHeapTotal = SmHeapTotal - hi->hi_size + size;
564 hi->hi_size = size;
591 sm_realloc_x(ptr, size) in sm_realloc_x() argument
593 size_t size;
601 newptr = realloc(ptr, MALLOC_SIZE(size));
609 return sm_malloc_tagged_x(size, "realloc", 0, SmHeapGroup);
619 < SmHeapTotal - hi->hi_size + size)
624 newptr = realloc(ptr, MALLOC_SIZE(size));
628 SmHeapTotal = SmHeapTotal - hi->hi_size + size;
633 hi->hi_size = size;