Mercurial > hg > xemacs-beta
annotate src/ExternalClientP.h @ 5158:9e0b43d3095c
more cleanups to object-memory-usage stuff
-------------------- ChangeLog entries follow: --------------------
lisp/ChangeLog addition:
2010-03-19 Ben Wing <ben@xemacs.org>
* diagnose.el (show-object-memory-usage-stats):
Rewrite to take into account non-lisp-storage statistics
returned by garbage-collect-1 and friends.
src/ChangeLog addition:
2010-03-19 Ben Wing <ben@xemacs.org>
* alloc.c:
* alloc.c (struct):
* alloc.c (tick_lrecord_stats):
* alloc.c (gc_sweep_1):
* alloc.c (finish_object_memory_usage_stats):
* alloc.c (object_memory_usage_stats):
* alloc.c (compute_memusage_stats_length):
Call new memory-usage mechanism at sweep time to compute extra
memory utilization for all objects. Add up the values element-by-
element to get an aggregrate set of statistics, where each is the
sum of the values of a single statistic across different objects
of the same type. At end of sweep time, call
finish_object_memory_usage_stats() to add up all the aggreggrate
stats that are related to non-Lisp memory storage to compute
a single value, and add it to the list of values returned by
`garbage-collect' and `object-memory-usage-stats'.
* buffer.c (compute_buffer_text_usage):
Don't crash on buffers without text (killed buffers?) and don't
double-count indirect buffers.
* elhash.c:
* elhash.c (hash_table_objects_create):
* elhash.c (vars_of_elhash):
* symsinit.h:
Add memory-usage method to count the size of `hentries'.
* emacs.c (main_1):
Call new functions in elhash.c, frame.c at init.
* frame.c:
* frame.c (compute_frame_usage):
* frame.c (frame_memory_usage):
* frame.c (frame_objects_create):
* symsinit.h:
Add memory-usage method to count gutter display structures,
subwindow exposures.
* gc.c (gc_finish):
* lisp.h:
Declare finish_object_memory_usage_stats(), call it in gc_finish().
* lrecord.h (struct lrecord_implementation):
* lrecord.h (INIT_MEMORY_USAGE_STATS):
New value in implementation struct to track number of non-Lisp-memory
statistics. Computed in alloc.c.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Fri, 19 Mar 2010 14:47:44 -0500 |
parents | 74fd4e045ea6 |
children | 697ef44129c6 2aa9cd456ae7 |
rev | line source |
---|---|
0 | 1 /* External client widget internal header file. |
2 Copyright (C) 1993, 1994 Sun Microsystems, Inc. | |
3 | |
4 This library is free software; you can redistribute it and/or | |
5 modify it under the terms of the GNU Library General Public | |
6 License as published by the Free Software Foundation; either | |
7 version 2 of the License, or (at your option) any later version. | |
8 | |
9 This library is distributed in the hope that it will be useful, | |
10 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
12 Library General Public License for more details. | |
13 | |
14 You should have received a copy of the GNU Library General Public | |
15 License along with this library; if not, write to | |
16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
17 Boston, MA 02111-1307, USA. */ | |
18 | |
19 /* Synched up with: Not in FSF. */ | |
20 | |
21 /* Written by Ben Wing. */ | |
22 | |
398 | 23 #ifndef INCLUDED_ExternalClientP_h_ |
24 #define INCLUDED_ExternalClientP_h_ | |
0 | 25 |
26 #include "ExternalClient.h" | |
27 #ifdef EXTW_USES_MOTIF | |
28 #include <Xm/PrimitiveP.h> | |
29 #endif | |
30 | |
31 typedef struct { /* new fields for ExternalClient class */ | |
32 int dummy; | |
33 } ExternalClientClassPart; | |
34 | |
35 typedef struct _ExternalClientClassRec { /* full class record declaration */ | |
36 CoreClassPart core_class; | |
37 #ifdef EXTW_USES_MOTIF | |
38 XmPrimitiveClassPart primitive_class; | |
39 #endif | |
40 ExternalClientClassPart externalClient_class; | |
41 } ExternalClientClassRec; | |
42 | |
43 typedef struct { /* new fields for ExternalClient widget */ | |
44 Bool dead_shell; /* is the shell dead? */ | |
45 unsigned long shell_timeout;/* how long to wait for shell's response */ | |
46 int shell_ready; /* is the shell ready? */ | |
47 Window event_window; | |
48 long event_mask; | |
49 Bool has_focus; | |
50 char *emacs_procid; | |
51 XtCallbackList shell_ready_callback; | |
52 String shell_name; | |
53 Bool use_tooltalk; | |
54 } ExternalClientPart; | |
55 | |
56 typedef struct _ExternalClientRec { /* full instance record */ | |
57 CorePart core; | |
58 #ifdef EXTW_USES_MOTIF | |
59 XmPrimitivePart primitive; | |
60 #endif | |
61 ExternalClientPart externalClient; | |
62 } ExternalClientRec; | |
63 | |
64 extern ExternalClientClassRec externalClientClassRec; /* class pointer */ | |
65 | |
398 | 66 #endif /* INCLUDED_ExternalClientP_h_ */ |