Expose API to control the minimum bytes allocated before a GC occurs
authorJonathan Chambers <joncham@gmail.com>
Tue, 10 Apr 2018 17:07:41 +0000 (13:07 -0400)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 23 Apr 2018 07:06:44 +0000 (10:06 +0300)
commit14a61e98a81998d976b5119d8881de4444e93832
tree1d4e32a5a3f9375f9df46a0759eeff48c05b9ede
parent13a6e9e23c81f61bdeeaabf4642a62b3eb41a0d6
Expose API to control the minimum bytes allocated before a GC occurs
(a cherry-pick of commit 4c0e58d from 'unity-release-7_4-incremental')

* alloc.c (min_bytes_allocd_minimum): New static variable.
* alloc.c (GC_set_min_bytes_allocd, GC_get_min_bytes_allocd): New API
function definition (to set/get min_bytes_allocd_minimum).
* alloc.c (min_bytes_allocd): Return min_bytes_allocd_minimum if
result is less than min_bytes_allocd_minimum.
* include/gc.h (GC_set_min_bytes_allocd, GC_get_min_bytes_allocd): New
API function declaration.
* tests/test.c [GC_PTHREADS] (main): Call GC_set_min_bytes_allocd()
and GC_get_min_bytes_allocd().
alloc.c
include/gc.h
tests/test.c