diff --git a/libgst/alloc.c b/libgst/alloc.c index 37ceddf..0325453 100644 --- a/libgst/alloc.c +++ b/libgst/alloc.c @@ -122,7 +122,7 @@ static size_t pagesize; heap_data * _gst_mem_new_heap (size_t heap_allocation_size, size_t heap_limit) { - heap_data *h = (heap_data *) malloc (sizeof (heap_data)); + heap_data *h = (heap_data *) calloc (1, sizeof (*h)); init_heap (h, heap_allocation_size, heap_limit); return h; } diff --git a/libgst/oop.c b/libgst/oop.c index e9de548..ea52d4e 100644 --- a/libgst/oop.c +++ b/libgst/oop.c @@ -995,7 +995,6 @@ void _gst_compact (size_t new_heap_limit) { OOP oop; - grey_area_node *node, **next, *last; heap_data *new_heap = init_old_space ( new_heap_limit ? new_heap_limit : _gst_mem.old->heap_limit); @@ -1015,26 +1014,6 @@ _gst_compact (size_t new_heap_limit) update_stats (&stats.timeOfLastCompaction, NULL, NULL); } - /* Leave only pages from the loaded image in the grey table. */ - for (last = NULL, next = &_gst_mem.grey_pages.head; (node = *next); ) - if (node->base >= (OOP *)_gst_mem.loaded_base - && node->base < _gst_mem.loaded_end) - { -#ifdef MMAN_DEBUG_OUTPUT - printf (" Remembered table entry left for loaded image: %p..%p\n", - node->base, node->base+node->n); -#endif - last = node; - next = &(node->next); - } - else - { - _gst_mem.rememberedTableEntries--; - *next = node->next; - xfree (node); - } - - _gst_mem.grey_pages.tail = last; _gst_fixup_object_pointers (); /* Now do the copying loop which will compact oldspace. */