Lines Matching refs:bytes
1019 DLMALLOC_EXPORT size_t dlmalloc_set_footprint_limit(size_t bytes);
1328 DLMALLOC_EXPORT void* mspace_malloc(mspace msp, size_t bytes);
1361 DLMALLOC_EXPORT void* mspace_memalign(mspace msp, size_t alignment, size_t bytes);
4556 void* dlmalloc(size_t bytes) { in dlmalloc() argument
4587 if (bytes <= MAX_SMALL_REQUEST) { in dlmalloc()
4590 nb = (bytes < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(bytes); in dlmalloc()
4640 else if (bytes >= MAX_REQUEST) in dlmalloc()
4643 nb = pad_request(bytes); in dlmalloc()
4687 return hwasan_tag_memory(mem, bytes); in dlmalloc()
4910 static void* internal_memalign(mstate m, size_t alignment, size_t bytes) { in internal_memalign() argument
4919 if (bytes >= MAX_REQUEST - alignment) { in internal_memalign()
4925 size_t nb = request2size(bytes); in internal_memalign()
4986 mem = hwasan_tag_memory(mem, bytes); in internal_memalign()
5212 void* dlrealloc(void* oldmem, size_t bytes) { in dlrealloc() argument
5215 mem = dlmalloc(bytes); in dlrealloc()
5217 else if (bytes >= MAX_REQUEST) { in dlrealloc()
5221 else if (bytes == 0) { in dlrealloc()
5226 size_t nb = request2size(bytes); in dlrealloc()
5249 mem = internal_malloc(m, bytes); in dlrealloc()
5252 memcpy(mem, oldmem, (oc < bytes)? oc : bytes); in dlrealloc()
5259 return hwasan_tag_memory(mem, bytes); in dlrealloc()
5265 void* dlrealloc_in_place(void* oldmem, size_t bytes) { in dlrealloc_in_place() argument
5268 if (bytes >= MAX_REQUEST) { in dlrealloc_in_place()
5272 size_t nb = request2size(bytes); in dlrealloc_in_place()
5296 void* dlmemalign(size_t alignment, size_t bytes) { in dlmemalign() argument
5298 return dlmalloc(bytes); in dlmemalign()
5300 return internal_memalign(gm, alignment, bytes); in dlmemalign()
5303 int dlposix_memalign(void** pp, size_t alignment, size_t bytes) { in dlposix_memalign() argument
5306 mem = dlmalloc(bytes); in dlposix_memalign()
5312 else if (bytes <= MAX_REQUEST - alignment) { in dlposix_memalign()
5315 mem = internal_memalign(gm, alignment, bytes); in dlposix_memalign()
5326 void* dlvalloc(size_t bytes) { in dlvalloc() argument
5330 return dlmemalign(pagesz, bytes); in dlvalloc()
5333 void* dlpvalloc(size_t bytes) { in dlpvalloc() argument
5337 return dlmemalign(pagesz, (bytes + pagesz - SIZE_T_ONE) & ~(pagesz - SIZE_T_ONE)); in dlpvalloc()
5392 size_t dlmalloc_set_footprint_limit(size_t bytes) { in dlmalloc_set_footprint_limit() argument
5394 if (bytes == 0) in dlmalloc_set_footprint_limit()
5396 if (bytes == MAX_SIZE_T) in dlmalloc_set_footprint_limit()
5399 result = granularity_align(bytes); in dlmalloc_set_footprint_limit()
5535 void* mspace_malloc(mspace msp, size_t bytes) { in mspace_malloc() argument
5544 if (bytes <= MAX_SMALL_REQUEST) { in mspace_malloc()
5547 nb = (bytes < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(bytes); in mspace_malloc()
5597 else if (bytes >= MAX_REQUEST) in mspace_malloc()
5600 nb = pad_request(bytes); in mspace_malloc()
5770 void* mspace_realloc(mspace msp, void* oldmem, size_t bytes) { in mspace_realloc() argument
5773 mem = mspace_malloc(msp, bytes); in mspace_realloc()
5775 else if (bytes >= MAX_REQUEST) { in mspace_realloc()
5779 else if (bytes == 0) { in mspace_realloc()
5784 size_t nb = request2size(bytes); in mspace_realloc()
5803 mem = mspace_malloc(m, bytes); in mspace_realloc()
5806 memcpy(mem, oldmem, (oc < bytes)? oc : bytes); in mspace_realloc()
5815 void* mspace_realloc_in_place(mspace msp, void* oldmem, size_t bytes) { in mspace_realloc_in_place() argument
5818 if (bytes >= MAX_REQUEST) { in mspace_realloc_in_place()
5822 size_t nb = request2size(bytes); in mspace_realloc_in_place()
5847 void* mspace_memalign(mspace msp, size_t alignment, size_t bytes) { in mspace_memalign() argument
5854 return mspace_malloc(msp, bytes); in mspace_memalign()
5855 return internal_memalign(ms, alignment, bytes); in mspace_memalign()
5967 size_t mspace_set_footprint_limit(mspace msp, size_t bytes) { in mspace_set_footprint_limit() argument
5971 if (bytes == 0) in mspace_set_footprint_limit()
5973 if (bytes == MAX_SIZE_T) in mspace_set_footprint_limit()
5976 result = granularity_align(bytes); in mspace_set_footprint_limit()