comparison src/ralloc.c @ 20:859a2309aef8 r19-15b93

Import from CVS: tag r19-15b93
author cvs
date Mon, 13 Aug 2007 08:50:05 +0200
parents 0293115a14e9
children 8d2a9b52c682
comparison
equal deleted inserted replaced
19:ac1f612d5250 20:859a2309aef8
825 #define MEMMETER(x) {x;} 825 #define MEMMETER(x) {x;}
826 #define MVAL(x) (meter[x]) 826 #define MVAL(x) (meter[x])
827 #define MLVAL(x) (make_int (meter[x])) 827 #define MLVAL(x) (make_int (meter[x]))
828 static int meter[N_Meterables]; 828 static int meter[N_Meterables];
829 829
830 DEFUN ("mmap-allocator-status", Fmmap_allocator_status, 830 DEFUN ("mmap-allocator-status", Fmmap_allocator_status, 0, 0, 0, /*
831 Smmap_allocator_status, 0, 0, 0 /*
832 Return some information about mmap-based allocator. 831 Return some information about mmap-based allocator.
833 832
834 mmap-addrlist-size: number of entries in address picking list. 833 mmap-addrlist-size: number of entries in address picking list.
835 mmap-times-mapped: number of times r_alloc was called. 834 mmap-times-mapped: number of times r_alloc was called.
836 mmap-pages-mapped: number of pages mapped by r_alloc calls only. 835 mmap-pages-mapped: number of pages mapped by r_alloc calls only.
839 mmap-didnt-copy: number of times re-alloc didn\'t have to move the block. 838 mmap-didnt-copy: number of times re-alloc didn\'t have to move the block.
840 mmap-pages-copied: total number of pages copied. 839 mmap-pages-copied: total number of pages copied.
841 mmap-average-bumpval: average increase in size demanded to re-alloc. 840 mmap-average-bumpval: average increase in size demanded to re-alloc.
842 mmap-wastage: total number of bytes allocated, but not currently in use. 841 mmap-wastage: total number of bytes allocated, but not currently in use.
843 mmap-live-pages: total number of pages live. 842 mmap-live-pages: total number of pages live.
844 */ ) 843 */
845 () 844 ())
846 { 845 {
847 Lisp_Object result; 846 Lisp_Object result;
848 847
849 result = Fcons (Fcons (Qmm_addrlist_size, MLVAL (M_Addrlist_Size)), Qnil); 848 result = Fcons (Fcons (Qmm_addrlist_size, MLVAL (M_Addrlist_Size)), Qnil);
850 result = Fcons (Fcons (Qmm_hash_worked, MLVAL (M_Hash_Worked)), result); 849 result = Fcons (Fcons (Qmm_hash_worked, MLVAL (M_Hash_Worked)), result);
1277 defsymbol (&Qmm_wastage, "mmap-wastage"); 1276 defsymbol (&Qmm_wastage, "mmap-wastage");
1278 defsymbol (&Qmm_live_pages, "mmap-live-pages"); 1277 defsymbol (&Qmm_live_pages, "mmap-live-pages");
1279 defsymbol (&Qmm_addr_looked_up, "mmap-had-to-look-up-address"); 1278 defsymbol (&Qmm_addr_looked_up, "mmap-had-to-look-up-address");
1280 defsymbol (&Qmm_hash_worked, "mmap-hash-table-worked"); 1279 defsymbol (&Qmm_hash_worked, "mmap-hash-table-worked");
1281 defsymbol (&Qmm_addrlist_size, "mmap-addrlist-size"); 1280 defsymbol (&Qmm_addrlist_size, "mmap-addrlist-size");
1282 defsubr (&Smmap_allocator_status); 1281 DEFSUBR (Fmmap_allocator_status);
1283 #endif /* MMAP_METERING */ 1282 #endif /* MMAP_METERING */
1284 } 1283 }
1285 1284
1286 void 1285 void
1287 vars_of_ralloc (void) 1286 vars_of_ralloc (void)