comparison src/mc-alloc.c @ 4117:229bd619740a

[xemacs-hg @ 2007-08-15 11:06:02 by crestani] 2007-08-15 Marcus Crestani <crestani@xemacs.org> * buffer.c (Fkill_buffer): * console-tty.c (free_tty_console_struct): * device-gtk.c (free_gtk_device_struct): * device-msw.c (mswindows_delete_device): * device-msw.c (msprinter_delete_device): * device-x.c (free_x_device_struct): * device-x.c (x_delete_device): * dynarr.c (Dynarr_lisp_realloc): * dynarr.c (Dynarr_free): * elhash.c: * elhash.c (finalize_hash_table): * elhash.c (resize_hash_table): * elhash.c (pdump_reorganize_hash_table): * extents.c (gap_array_delete_marker): * frame-gtk.c (gtk_delete_frame): * frame-msw.c (mswindows_delete_frame): * frame-x.c (x_delete_frame): * glyphs.c (check_for_ignored_expose): * mc-alloc.c (mc_realloc_1): * mc-alloc.h: * objects-tty.c (tty_finalize_color_instance): * objects-tty.c (tty_finalize_font_instance): * objects-tty.c (console_type_create_objects_tty): * syntax.c: * syntax.c (uninit_buffer_syntax_cache): * vdb.c (Ftest_vdb): Remove all calls to mc_free.
author crestani
date Wed, 15 Aug 2007 11:06:10 +0000
parents 1043bbfa24cf
children 93bd75c45dca
comparison
equal deleted inserted replaced
4116:9a42c5e5eb4e 4117:229bd619740a
1574 { 1574 {
1575 return visit_all_used_page_headers (sweep_page); 1575 return visit_all_used_page_headers (sweep_page);
1576 } 1576 }
1577 1577
1578 1578
1579 /* Frees the cell pointed to by ptr. */
1580 void
1581 mc_free (void *UNUSED (ptr))
1582 {
1583 /* Manual frees are not allowed with asynchronous finalization */
1584 return;
1585 }
1586
1587
1588 /* Changes the size of the cell pointed to by ptr. 1579 /* Changes the size of the cell pointed to by ptr.
1589 Returns the new address of the new cell with new size. */ 1580 Returns the new address of the new cell with new size. */
1590 void * 1581 void *
1591 mc_realloc_1 (void *ptr, size_t size, int elemcount) 1582 mc_realloc_1 (void *ptr, size_t size, int elemcount)
1592 { 1583 {
1601 cpy_size = from_size; 1592 cpy_size = from_size;
1602 memcpy (result, ptr, cpy_size); 1593 memcpy (result, ptr, cpy_size);
1603 #ifdef ALLOC_TYPE_STATS 1594 #ifdef ALLOC_TYPE_STATS
1604 inc_lrecord_stats (size, (struct lrecord_header *) result); 1595 inc_lrecord_stats (size, (struct lrecord_header *) result);
1605 #endif /* not ALLOC_TYPE_STATS */ 1596 #endif /* not ALLOC_TYPE_STATS */
1606 /* mc_free (ptr); not needed, will be collected next gc */
1607 return result; 1597 return result;
1608 } 1598 }
1609 else 1599 else
1610 { 1600 {
1611 /* mc_free (ptr); not needed, will be collected next gc */
1612 return 0; 1601 return 0;
1613 } 1602 }
1614 } 1603 }
1615 else 1604 else
1616 return mc_alloc_1 (size, elemcount); 1605 return mc_alloc_1 (size, elemcount);