aboutsummaryrefslogtreecommitdiff
path: root/libmudflap/mf-hooks1.c
diff options
context:
space:
mode:
authorfche <fche@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-24 21:12:18 +0000
committerfche <fche@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-24 21:12:18 +0000
commit9a1a84ca103b211b3b5c02d9618752a2a57d6201 (patch)
treeb11f74e9117eab25751541c23cf9a481cd239e29 /libmudflap/mf-hooks1.c
parenta95bd78053d406b8805a71771e8e686f7ebdeef4 (diff)
2004-06-24 Frank Ch. Eigler <fche@redhat.com>
Adopt splay trees for object database. * Makefile.am: Copy splay-tree.* from libiberty. * Makefile.in, testsuite/Makefile.in: Regenerated. * mf-runtime.h.in (__mf_unregister): Add third parameter (type). * mf-hooks[123].c (*): Add new third parameter to mf_unregister. * mf-impl.h (BEGIN_PROTECT): Remove some trace text. * mf-runtime.c: Rewrite code dealing with object database to use libiberty splay trees. Remove tree liveness aging option. * testsuite/libmudflap.c/fail18-frag.c: Add volatile flag. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83611 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libmudflap/mf-hooks1.c')
-rw-r--r--libmudflap/mf-hooks1.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libmudflap/mf-hooks1.c b/libmudflap/mf-hooks1.c
index d2f8312314f..ba6bc959dd6 100644
--- a/libmudflap/mf-hooks1.c
+++ b/libmudflap/mf-hooks1.c
@@ -199,7 +199,8 @@ WRAPPER(void *, realloc, void *buf, size_t c)
__mf_opts.wipe_heap = 0;
if (LIKELY(buf))
- __mfu_unregister (buf, 0);
+ __mfu_unregister (buf, 0, __MF_TYPE_HEAP_I);
+ /* NB: underlying region may have been __MF_TYPE_HEAP. */
if (LIKELY(result))
{
@@ -250,7 +251,8 @@ WRAPPER(void, free, void *buf)
}
UNLOCKTH ();
- __mf_unregister (buf, 0);
+ __mf_unregister (buf, 0, __MF_TYPE_HEAP_I);
+ /* NB: underlying region may have been __MF_TYPE_HEAP. */
if (UNLIKELY(__mf_opts.free_queue_length > 0))
{
@@ -378,7 +380,7 @@ WRAPPER(int , munmap, void *start, size_t length)
uintptr_t offset;
for (offset=0; offset<length; offset+=ps)
- __mf_unregister ((void *) CLAMPADD (base, offset), ps);
+ __mf_unregister ((void *) CLAMPADD (base, offset), ps, __MF_TYPE_HEAP_I);
}
return result;
}
@@ -419,7 +421,7 @@ __mf_wrap_alloca_indirect (size_t c)
((uintptr_t) alloca_history->stack DEEPER_THAN (uintptr_t) stack))
{
struct alloca_tracking *next = alloca_history->next;
- __mf_unregister (alloca_history->ptr, 0);
+ __mf_unregister (alloca_history->ptr, 0, __MF_TYPE_HEAP);
CALL_REAL (free, alloca_history->ptr);
CALL_REAL (free, alloca_history);
alloca_history = next;