Lines Matching refs:size
64 ** The behaviour of malloc with size==0 is platform dependent (it
68 ** two choices: "size = 1" or "return NULL". We use the former in the
72 ** use size.
75 #define MALLOC_SIZE(size) ((size) == 0 ? 1 : (size))
81 ** size -- size of requested memory.
96 sm_malloc_x(size)
97 size_t size;
102 ptr = malloc(MALLOC_SIZE(size));
115 ** size -- size of requested memory.
122 sm_malloc(size)
123 size_t size;
128 ptr = malloc(MALLOC_SIZE(size));
138 ** size -- size of requested memory.
145 sm_realloc(ptr, size)
147 size_t size;
152 newptr = realloc(ptr, MALLOC_SIZE(size));
162 ** size -- size of requested memory.
172 sm_realloc_x(ptr, size)
174 size_t size;
179 newptr = realloc(ptr, MALLOC_SIZE(size));
351 ** size -- size of requested memory.
361 sm_malloc_tagged(size, tag, num, group)
362 size_t size;
372 ptr = malloc(MALLOC_SIZE(size));
380 && sm_debug_level(&SmHeapLimit) < SmHeapTotal + size)
383 ptr = malloc(MALLOC_SIZE(size));
385 if (ptr != NULL && !sm_heap_register(ptr, size, tag, num, group))
392 SmHeapTotal += size;
402 ** size -- size of requested memory.
415 sm_malloc_tagged_x(size, tag, num, group)
416 size_t size;
426 ptr = malloc(MALLOC_SIZE(size));
435 && sm_debug_level(&SmHeapLimit) < SmHeapTotal + size)
440 ptr = malloc(MALLOC_SIZE(size));
442 if (ptr != NULL && !sm_heap_register(ptr, size, tag, num, group))
451 SmHeapTotal += size;
462 ** size -- size of requested memory.
472 sm_heap_register(ptr, size, tag, num, group)
474 size_t size;
505 hi->hi_size = size;
518 ** size -- size of requested memory.
525 sm_realloc(ptr, size)
527 size_t size;
535 newptr = realloc(ptr, MALLOC_SIZE(size));
541 return sm_malloc_tagged(size, "realloc", 0, SmHeapGroup);
552 < SmHeapTotal - hi->hi_size + size)
557 newptr = realloc(ptr, MALLOC_SIZE(size));
561 SmHeapTotal = SmHeapTotal - hi->hi_size + size;
566 hi->hi_size = size;
583 ** size -- size of requested memory.
593 sm_realloc_x(ptr, size)
595 size_t size;
603 newptr = realloc(ptr, MALLOC_SIZE(size));
611 return sm_malloc_tagged_x(size, "realloc", 0, SmHeapGroup);
621 < SmHeapTotal - hi->hi_size + size)
626 newptr = realloc(ptr, MALLOC_SIZE(size));
630 SmHeapTotal = SmHeapTotal - hi->hi_size + size;
635 hi->hi_size = size;