comparison src/mc-alloc.c @ 5354:22c4e67a2e69

Remove #'acons from cl.el, make the version in alloc.c visible to Lisp src/ChangeLog addition: 2011-02-09 Aidan Kehoe <kehoea@parhasard.net> * alloc.c (Facons): * alloc.c (Fobject_memory_usage): * alloc.c (syms_of_alloc): * faces.c (complex_vars_of_faces): * lisp.h: * mc-alloc.c (Fmc_alloc_memory_usage): Rename acons() to Facons(), make it visible to Lisp. Change uses of the function in C accordingly. lisp/ChangeLog addition: 2011-02-09 Aidan Kehoe <kehoea@parhasard.net> * cl.el (acons): Removed, make the implementation in alloc.c visible to Lisp instead.
author Aidan Kehoe <kehoea@parhasard.net>
date Wed, 09 Feb 2011 20:15:50 +0000
parents b249c479f9e1
children 00e79bbbe48f
comparison
equal deleted inserted replaced
5353:38e24b8be4ea 5354:22c4e67a2e69
1985 EMACS_INT i; 1985 EMACS_INT i;
1986 1986
1987 for (i = 0; i < N_FREE_PAGE_LISTS; i++) 1987 for (i = 0; i < N_FREE_PAGE_LISTS; i++)
1988 if (PLH_PAGE_COUNT (FREE_HEAP_PAGES(i)) > 0) 1988 if (PLH_PAGE_COUNT (FREE_HEAP_PAGES(i)) > 0)
1989 free_plhs = 1989 free_plhs =
1990 acons (make_int (PLH_SIZE (FREE_HEAP_PAGES(i))), 1990 Facons (make_int (PLH_SIZE (FREE_HEAP_PAGES(i))),
1991 list1 (make_int (PLH_PAGE_COUNT (FREE_HEAP_PAGES(i)))), 1991 list1 (make_int (PLH_PAGE_COUNT (FREE_HEAP_PAGES(i)))),
1992 free_plhs); 1992 free_plhs);
1993 1993
1994 for (i = 0; i < N_USED_PAGE_LISTS; i++) 1994 for (i = 0; i < N_USED_PAGE_LISTS; i++)
1995 if (PLH_PAGE_COUNT (USED_HEAP_PAGES(i)) > 0) 1995 if (PLH_PAGE_COUNT (USED_HEAP_PAGES(i)) > 0)
1996 used_plhs = 1996 used_plhs =
1997 acons (make_int (PLH_SIZE (USED_HEAP_PAGES(i))), 1997 Facons (make_int (PLH_SIZE (USED_HEAP_PAGES(i))),
1998 list5 (make_int (PLH_PAGE_COUNT (USED_HEAP_PAGES(i))), 1998 list5 (make_int (PLH_PAGE_COUNT (USED_HEAP_PAGES(i))),
1999 make_int (PLH_USED_CELLS (USED_HEAP_PAGES(i))), 1999 make_int (PLH_USED_CELLS (USED_HEAP_PAGES(i))),
2000 make_int (PLH_USED_SPACE (USED_HEAP_PAGES(i))), 2000 make_int (PLH_USED_SPACE (USED_HEAP_PAGES(i))),
2001 make_int (PLH_TOTAL_CELLS (USED_HEAP_PAGES(i))), 2001 make_int (PLH_TOTAL_CELLS (USED_HEAP_PAGES(i))),
2002 make_int (PLH_TOTAL_SPACE (USED_HEAP_PAGES(i)))), 2002 make_int (PLH_TOTAL_SPACE (USED_HEAP_PAGES(i)))),
2003 used_plhs); 2003 used_plhs);
2004 2004
2005 used_plhs = 2005 used_plhs =
2006 acons (make_int (0), 2006 Facons (make_int (0),
2007 list5 (make_int (PLH_PAGE_COUNT(ARRAY_HEAP_PAGES)), 2007 list5 (make_int (PLH_PAGE_COUNT(ARRAY_HEAP_PAGES)),
2008 make_int (PLH_USED_CELLS (ARRAY_HEAP_PAGES)), 2008 make_int (PLH_USED_CELLS (ARRAY_HEAP_PAGES)),
2009 make_int (PLH_USED_SPACE (ARRAY_HEAP_PAGES)), 2009 make_int (PLH_USED_SPACE (ARRAY_HEAP_PAGES)),
2010 make_int (PLH_TOTAL_CELLS (ARRAY_HEAP_PAGES)), 2010 make_int (PLH_TOTAL_CELLS (ARRAY_HEAP_PAGES)),
2011 make_int (PLH_TOTAL_SPACE (ARRAY_HEAP_PAGES))), 2011 make_int (PLH_TOTAL_SPACE (ARRAY_HEAP_PAGES))),
2012 used_plhs); 2012 used_plhs);
2013 2013
2014 for (i = 0; i < N_HEAP_SECTIONS; i++) { 2014 for (i = 0; i < N_HEAP_SECTIONS; i++) {
2015 used_size += HEAP_SECTION(i).n_pages * PAGE_SIZE; 2015 used_size += HEAP_SECTION(i).n_pages * PAGE_SIZE;
2016 real_size += 2016 real_size +=
2017 malloced_storage_size (0, HEAP_SECTION(i).real_size, 0); 2017 malloced_storage_size (0, HEAP_SECTION(i).real_size, 0);