-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not iterate over heap blocks in GC_get_memory_use
GC_get_memory_use() return the total memory use (in bytes) by all allocated blocks, but this is equal to GC_get_heap_size() minus GC_get_free_bytes(). * include/gc/gc.h (GC_get_memory_use): Refine comment. * misc.c (block_add_size): Remove static function definition. * misc.c (GC_get_memory_use): Add assertion that GC_heapsize>=GC_large_free_bytes; set bytes to GC_heapsize-GC_large_free_bytes instead of calling GC_apply_to_all_blocks(block_add_size).
- Loading branch information
Showing
2 changed files
with
6 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters