diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2009-11-12 18:45:14 -0800 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2009-11-12 18:45:14 -0800 |
commit | 194d3fa048cf909ca592dd56fa538dc9cd3f5ddb (patch) | |
tree | 3a00bb9e267cf952d7d1140ff9a39ca07ee6c994 /libc/bionic/dlmalloc.h | |
parent | fde8642fc43bdd224e43e5ee9583a49a758fb03c (diff) | |
download | bionic-194d3fa048cf909ca592dd56fa538dc9cd3f5ddb.zip bionic-194d3fa048cf909ca592dd56fa538dc9cd3f5ddb.tar.gz bionic-194d3fa048cf909ca592dd56fa538dc9cd3f5ddb.tar.bz2 |
eclair snapshot
Diffstat (limited to 'libc/bionic/dlmalloc.h')
-rw-r--r-- | libc/bionic/dlmalloc.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libc/bionic/dlmalloc.h b/libc/bionic/dlmalloc.h index 75b5e1f..e5f7d4a 100644 --- a/libc/bionic/dlmalloc.h +++ b/libc/bionic/dlmalloc.h @@ -547,6 +547,21 @@ void mspace_free(mspace msp, void* mem); void* mspace_realloc(mspace msp, void* mem, size_t newsize); /* + mspace_merge_objects will merge allocated memory mema and memb + together, provided memb immediately follows mema. It is roughly as + if memb has been freed and mema has been realloced to a larger size. + On successfully merging, mema will be returned. If either argument + is null or memb does not immediately follow mema, null will be + returned. + + Both mema and memb should have been previously allocated using + malloc or a related routine such as realloc. If either mema or memb + was not malloced or was previously freed, the result is undefined, + but like mspace_free, the default is to abort the program. +*/ +void* mspace_merge_objects(mspace msp, void* mema, void* memb); + +/* mspace_calloc behaves as calloc, but operates within the given space. */ |