[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9273: 23.3; malloc initialization should (sometimes) happen at runti
From: |
Stefan Monnier |
Subject: |
bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime |
Date: |
Sat, 13 Aug 2011 11:07:48 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>>> _heapinfo is indeed consistent with the current heap. But the pointer
>>> that was passed to realloc points into the old heap. So applying BLOCK
>>> to that pointer yields an absurd result. I can easily catch such cases
>>> by testing for ptr< _heapbase, as in my patch to _free_internal_nolock,
>>> but I have to figure out the best way to handle them once I've caught
>>> them.
>> malloc a buffer, then copy the contents of the old one to the new
>> one. You will have to know the size of the old block, which means you
>> will have to access the old copy of _heapinfo.
> Thanks! That's much easier than what I was trying to do.
Wouldn't it be easier to try and convince malloc to keep using the old
_heapinfo?
Stefan
- bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime, (continued)
- bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime, Ken Brown, 2011/08/11
- bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime, Eli Zaretskii, 2011/08/12
- bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime, Ken Brown, 2011/08/12
- bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime, Eli Zaretskii, 2011/08/12
- bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime, Ken Brown, 2011/08/12
- bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime, Ken Brown, 2011/08/12
- bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime, Eli Zaretskii, 2011/08/13
- bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime, Ken Brown, 2011/08/13
- bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime, Eli Zaretskii, 2011/08/13
- bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime, Ken Brown, 2011/08/13
- bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime,
Stefan Monnier <=
- bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime, Ken Brown, 2011/08/13
- bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime, Stefan Monnier, 2011/08/13
- bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime, Ken Brown, 2011/08/13
- bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime, Ken Brown, 2011/08/16
bug#9273: 23.3; malloc initialization should (sometimes) happen at runtime, grischka, 2011/08/12