mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 15:14:08 +00:00
Fix segment release check in internal memory allocator.
Thanks to Jinji Zeng. #1179 #1157
This commit is contained in:
parent
cae361187e
commit
9b5e837ac2
@ -975,7 +975,7 @@ static size_t release_unused_segments(mstate m)
|
||||
mchunkptr p = align_as_chunk(base);
|
||||
size_t psize = chunksize(p);
|
||||
/* Can unmap if first chunk holds entire segment and not pinned */
|
||||
if (!cinuse(p) && (char *)p + psize >= base + size - TOP_FOOT_SIZE) {
|
||||
if (!cinuse(p) && (char *)p + psize == (char *)mem2chunk(sp)) {
|
||||
tchunkptr tp = (tchunkptr)p;
|
||||
if (p == m->dv) {
|
||||
m->dv = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user