mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
[util] Fix handling of sline's list 'pointer'
I forgot to right-shift the value so offsets were becoming 0 or 8 instead of 0-15. This fixes the management of small objects. It turns out that after this fix, qfvis's problems were caused by fragmentation in the windings. Need to revisit line allocation and use POT-specialized pools.
This commit is contained in:
parent
9090c53519
commit
efdbd59909
1 changed files with 1 additions and 1 deletions
|
@ -377,7 +377,7 @@ cmemfree (memsuper_t *super, void *mem)
|
|||
// sub line block
|
||||
sline = (memsline_t *) ((size_t) mem & ~(MEM_LINE_SIZE - 1));
|
||||
*(uint16_t *) mem = sline->list << 2;
|
||||
sline->list = (size_t) mem & (MEM_LINE_SIZE - 1);
|
||||
sline->list = ((size_t) mem & (MEM_LINE_SIZE - 1)) >> 2;
|
||||
super_sline = &super->last_freed[sline->size];
|
||||
if (*super_sline != sline) {
|
||||
if (sline->next) {
|
||||
|
|
Loading…
Reference in a new issue