summaryrefslogtreecommitdiff
path: root/libc/stdlib
diff options
context:
space:
mode:
authorMiles Bader <miles@lsi.nec.co.jp>2002-10-15 02:16:58 +0000
committerMiles Bader <miles@lsi.nec.co.jp>2002-10-15 02:16:58 +0000
commitc5daf7d8dcd2f0e1c33320fba916444701e068cc (patch)
tree46ff5f306af2a5feeee1a642c51be88168258ce2 /libc/stdlib
parentb5cee82ede7fe5e253566ad6cb023f0640a605aa (diff)
Use __heap_[un]lock instead of __malloc_[un]lock.
Diffstat (limited to 'libc/stdlib')
-rw-r--r--libc/stdlib/malloc/realloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libc/stdlib/malloc/realloc.c b/libc/stdlib/malloc/realloc.c
index e4c8ad710..32cfacd54 100644
--- a/libc/stdlib/malloc/realloc.c
+++ b/libc/stdlib/malloc/realloc.c
@@ -51,9 +51,9 @@ realloc (void *mem, size_t new_size)
{
size_t extra = new_size - size;
- __malloc_lock ();
+ __heap_lock (heap);
extra = __heap_alloc_at (&__malloc_heap, base_mem + size, extra);
- __malloc_unlock ();
+ __heap_unlock (heap);
if (extra)
/* Record the changed size. */
@@ -74,9 +74,9 @@ realloc (void *mem, size_t new_size)
else if (new_size + MALLOC_REALLOC_MIN_FREE_SIZE <= size)
/* Shrink the block. */
{
- __malloc_lock ();
+ __heap_lock (heap);
__heap_free (&__malloc_heap, base_mem + new_size, size - new_size);
- __malloc_unlock ();
+ __heap_unlock (heap);
MALLOC_SET_SIZE (base_mem, new_size);
}