diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2021-09-11 10:04:39 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2021-09-11 10:04:39 +0300 |
commit | 7aadbb5292977562cd63afadcb08e2b436b05e00 (patch) | |
tree | 0ffb6b0d3ede40a530659fd7e9d95f13d1906331 /headers.c | |
parent | e801bea18fc4c04ec6499083afaebf3e011c2760 (diff) | |
download | bdwgc-7aadbb5292977562cd63afadcb08e2b436b05e00.tar.gz |
Fix missing scratch_last_end_ptr update (Irix)
* headers.c (GC_scratch_alloc): Update GC_scratch_last_end_ptr even if
the first GET_MEM() call fails because of out of memory.
Diffstat (limited to 'headers.c')
-rw-r--r-- | headers.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -141,6 +141,8 @@ GC_INNER ptr_t GC_scratch_alloc(size_t bytes) bytes_to_get = ROUNDUP_PAGESIZE_IF_MMAP(bytes); result = (ptr_t)GET_MEM(bytes_to_get); GC_add_to_our_memory(result, bytes_to_get); + if (result != NULL) + GC_scratch_last_end_ptr = result + bytes; return result; } /* Update scratch area pointers and retry. */ |