mirror of
https://github.com/facebook/zstd.git
synced 2025-03-07 01:10:04 +02:00
Shrink Table Valid End During Alloc Alignment / Phase Change
This commit is contained in:
parent
51d90668ba
commit
20c69077d1
@ -184,6 +184,9 @@ MEM_STATIC void ZSTD_cwksp_internal_advance_phase(
|
|||||||
* by a larger margin than the space that will be consumed. */
|
* by a larger margin than the space that will be consumed. */
|
||||||
/* TODO: cleaner, compiler warning friendly way to do this??? */
|
/* TODO: cleaner, compiler warning friendly way to do this??? */
|
||||||
ws->allocStart = (BYTE*)ws->allocStart - ((size_t)ws->allocStart & (sizeof(U32)-1));
|
ws->allocStart = (BYTE*)ws->allocStart - ((size_t)ws->allocStart & (sizeof(U32)-1));
|
||||||
|
if (ws->allocStart < ws->tableValidEnd) {
|
||||||
|
ws->tableValidEnd = ws->allocStart;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ws->phase = phase;
|
ws->phase = phase;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user