texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] Boehm-gc-texmacs gc behavior (was: Re: Boehm-gc-texmacs ca


From: David MENTRE
Subject: [Texmacs-dev] Boehm-gc-texmacs gc behavior (was: Re: Boehm-gc-texmacs cache behavior)
Date: Sun, 23 May 2004 20:51:44 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

David MENTRE <address@hidden> writes:

> Subjectively, texmacs seems to have the same interactivity but your
> right, memory consumption is doubled (resident size of 74 MB against
> about 35 MB for a standard texmacs). This is quite strange. Or there is
> a bad side effect, like a bad interaction between libgc and guile. E.g.,
> would it be possible that guile keeps pointers on memory that would have
> to be reclaimed? Should Guile be also built with the GC?

Ok. Digging into Boehm GC docs, I found the following:
http://www.hpl.hp.com/personal/Hans_Boehm/gc/debugging.html

*Unexpectedly Large Heap*

Unexpected heap growth can be due to one of the following:

   1. Data structures that are being unintentionally retained. This is
      commonly caused by data structures that are no longer being used,
      but were not cleared, or by caches growing without bounds.

   2. Pointer misidentification. The garbage collector is interpreting
      integers or other data as pointers and retaining the "referenced"
      objects. A common symptom is that GC_dump() shows much of the heap
      as black-listed.

   3. Heap fragmentation. This should never result in unbounded growth,
      but it may account for larger heaps. This is most commonly caused
      by allocation of large objects. On some platforms it can be
      reduced by building with -DUSE_MUNMAP, which will cause the
      collector to unmap memory corresponding to pages that have not
      been recently used.

   4. Per object overhead. This is usually a relatively minor effect,
      but it may be worth considering. If the collector recognizes
      interior pointers, object sizes are increased, so that
      one-past-the-end pointers are correctly recognized. The collector
      can be configured not to do this (-DDONT_ADD_BYTE_AT_END).


For (1), I can't tell. Would it be possible to have "caches growing
without bounds"? 

For (2), I take a look at GC_dump() (by setting env var
GC_DUMP_REGULARLY). It appears that about 35 MB is partially
black-listed. This would explain the x2 memory overhead. I don't know
what this partially means.

Free list 60 (Total size 36118528):
        0x96a9000 size 1077248 not black listed
        0x9edc000 size 35041280 partially black listed
Total of 60502016 bytes on free list

 (see a more complete detail below).

It would be interesting to know what resides at address 0x9edc000.

So (2) is a candidate explanation.


For (3), I can't tell. Is texmacs allocating large objects?

For (4), I can't tell but I wouldn't choose it as first candidate. 

I hope it lights a candle in this GC dark. :) But as you have done the
port, only you David can tell what is going wrong.

Yours,
d.

PS : details on the last GC pass:


***Finalization statistics:
80 finalization table entries; 11 disappearing links
0 objects are eligible for immediate finalization
***>Full mark for collection 7 after 9909300 allocd bytes
--> Marking for collection 7 after 9909300 allocd bytes + 149220 wasted bytes
Collection 6 finished ---> heapsize = 72028160 bytes
World-stopped marking took 20 msecs
***Static roots:
>From 0x832b000 to 0x832dc2c  (temporary)
>From 0x400336a0 to 0x40033df4  (temporary)
>From 0x400f8000 to 0x400faf78  (temporary)
>From 0x40162000 to 0x40168ee0  (temporary)
>From 0x40179000 to 0x401792dc  (temporary)
>From 0x40201000 to 0x40209ef0  (temporary)
>From 0x40210020 to 0x40210288  (temporary)
>From 0x402129dc to 0x40212b08  (temporary)
>From 0x4021f000 to 0x40221d60  (temporary)
>From 0x40227000 to 0x4024e23c  (temporary)
>From 0x40271000 to 0x402711c0  (temporary)
>From 0x40278b60 to 0x40278dd4  (temporary)
>From 0x4027be50 to 0x4027c000  (temporary)
>From 0x40299000 to 0x402a89e0  (temporary)
>From 0x402aa9e8 to 0x402aabbc  (temporary)
>From 0x4034aca0 to 0x40364f40  (temporary)
>From 0x4036c000 to 0x4036c700  (temporary)
>From 0x4049d120 to 0x404a7c6c  (temporary)
>From 0x40016480 to 0x40016e78  (temporary)
>From 0x40744980 to 0x40744d6c  (temporary)
>From 0x4074c800 to 0x4074caa0  (temporary)
>From 0x407308c4 to 0x40730a68  (temporary)
Total size: 487296

***Heap sections:
Total heap size: 72028160
Section 0 from 0x833e000 to 0xc047000 78/15625 blacklisted
Section 1 from 0xc078000 to 0xc819000 17/1953 blacklisted
Section 2 from 0x8335000 to 0x833c000 0/7 blacklisted

***Free blocks:
Free list 1 (Total size 4096):
        0x8639000 size 4096 not black listed
Free list 3 (Total size 159744):
        0x8660000 size 12288 not black listed
        0x86b5000 size 12288 not black listed
        0x86d1000 size 12288 not black listed
        0x86d5000 size 12288 not black listed
        0x8716000 size 12288 not black listed
        0x8728000 size 12288 not black listed
        0x8734000 size 12288 not black listed
        0x8773000 size 12288 not black listed
        0x8779000 size 12288 not black listed
        0x87f3000 size 12288 not black listed
        0x834a000 size 12288 not black listed
        0x837d000 size 12288 not black listed
        0x83ba000 size 12288 not black listed
Free list 4 (Total size 1212416):
        0xc508000 size 16384 not black listed
        0xc550000 size 16384 not black listed
        0xc555000 size 16384 not black listed
        0xc5fb000 size 16384 not black listed
        0xc617000 size 16384 not black listed
        0xc621000 size 16384 not black listed
        0xc62c000 size 16384 not black listed
        0xc653000 size 16384 not black listed
        0xc658000 size 16384 not black listed
        0xc6e4000 size 16384 not black listed
        0xc72f000 size 16384 not black listed
        0xc772000 size 16384 not black listed
        0xc780000 size 16384 not black listed
        0xc7b9000 size 16384 not black listed
        0xc123000 size 16384 not black listed
        0xc139000 size 16384 not black listed
        0xc144000 size 16384 not black listed
        0xc14f000 size 16384 not black listed
        0xc2c4000 size 16384 not black listed
        0x9c8d000 size 16384 not black listed
        0x9921000 size 16384 not black listed
        0x9926000 size 16384 not black listed
        0x9afc000 size 16384 not black listed
        0x9b02000 size 16384 not black listed
        0x9b62000 size 16384 not black listed
        0x9482000 size 16384 not black listed
        0x969e000 size 16384 not black listed
        0x9020000 size 16384 not black listed
        0x90ce000 size 16384 not black listed
        0x90dc000 size 16384 not black listed
        0x913d000 size 16384 not black listed
        0x9166000 size 16384 not black listed
        0x916c000 size 16384 not black listed
        0x9180000 size 16384 not black listed
        0x9185000 size 16384 not black listed
        0x91a8000 size 16384 not black listed
        0x91c9000 size 16384 not black listed
        0x9248000 size 16384 not black listed
        0x9274000 size 16384 not black listed
        0x9293000 size 16384 not black listed
        0x93a1000 size 16384 not black listed
        0x93be000 size 16384 not black listed
        0x8cf2000 size 16384 not black listed
        0x8df1000 size 16384 not black listed
        0x8ede000 size 16384 not black listed
        0x8ee4000 size 16384 not black listed
        0x8f27000 size 16384 not black listed
        0x8f9c000 size 16384 not black listed
        0x8fde000 size 16384 not black listed
        0x881b000 size 16384 not black listed
        0x8848000 size 16384 not black listed
        0x889c000 size 16384 not black listed
        0x89bd000 size 16384 not black listed
        0x843a000 size 16384 not black listed
        0x8448000 size 16384 not black listed
        0x8459000 size 16384 not black listed
        0x848e000 size 16384 not black listed
        0x84d2000 size 16384 not black listed
        0x84db000 size 16384 not black listed
        0x84e2000 size 16384 not black listed
        0x8542000 size 16384 not black listed
        0x854b000 size 16384 not black listed
        0x85c6000 size 16384 not black listed
        0x863e000 size 16384 not black listed
        0x86fa000 size 16384 not black listed
        0x874f000 size 16384 not black listed
        0x8766000 size 16384 not black listed
        0x879a000 size 16384 not black listed
        0x879f000 size 16384 not black listed
        0x87de000 size 16384 not black listed
        0x87f7000 size 16384 not black listed
        0x836e000 size 16384 not black listed
        0x83cf000 size 16384 not black listed
        0x83de000 size 16384 not black listed
Free list 5 (Total size 1413120):
        0xc664000 size 20480 not black listed
        0xc6ac000 size 20480 not black listed
        0xc6c3000 size 20480 not black listed
        0xc6cc000 size 20480 not black listed
        0xc701000 size 20480 not black listed
        0xc71b000 size 20480 not black listed
        0xc750000 size 20480 not black listed
        0xc7ac000 size 20480 not black listed
        0xc7b3000 size 20480 not black listed
        0xc7d7000 size 20480 not black listed
        0xc0c8000 size 20480 not black listed
        0xc149000 size 20480 not black listed
        0x9c94000 size 20480 not black listed
        0x9d71000 size 20480 not black listed
        0x9d81000 size 20480 not black listed
        0x9e84000 size 20480 not black listed
        0x9ed1000 size 20480 not black listed
        0x9913000 size 20480 not black listed
        0x992f000 size 20480 not black listed
        0x994d000 size 20480 not black listed
        0x9955000 size 20480 not black listed
        0x9ae9000 size 20480 not black listed
        0x9b1a000 size 20480 not black listed
        0x9b22000 size 20480 not black listed
        0x9b48000 size 20480 not black listed
        0x9b57000 size 20480 not black listed
        0x93fe000 size 20480 not black listed
        0x9404000 size 20480 not black listed
        0x941b000 size 20480 not black listed
        0x95ac000 size 20480 not black listed
        0x95bc000 size 20480 not black listed
        0x95cc000 size 20480 not black listed
        0x96a3000 size 20480 not black listed
        0x9098000 size 20480 not black listed
        0x90c8000 size 20480 not black listed
        0x9110000 size 20480 not black listed
        0x9191000 size 20480 not black listed
        0x919b000 size 20480 not black listed
        0x91a2000 size 20480 not black listed
        0x9242000 size 20480 not black listed
        0x9279000 size 20480 not black listed
        0x9379000 size 20480 not black listed
        0x93ce000 size 20480 not black listed
        0x8d83000 size 20480 not black listed
        0x8da8000 size 20480 not black listed
        0x8dba000 size 20480 not black listed
        0x8dd4000 size 20480 not black listed
        0x8dda000 size 20480 not black listed
        0x8de2000 size 20480 not black listed
        0x8ed0000 size 20480 not black listed
        0x8f8d000 size 20480 not black listed
        0x8828000 size 20480 not black listed
        0x8842000 size 20480 not black listed
        0x8956000 size 20480 not black listed
        0x8bf0000 size 20480 not black listed
        0x844d000 size 20480 not black listed
        0x8453000 size 20480 not black listed
        0x84f9000 size 20480 not black listed
        0x853c000 size 20480 not black listed
        0x85a3000 size 20480 not black listed
        0x85d6000 size 20480 not black listed
        0x8610000 size 20480 not black listed
        0x8621000 size 20480 not black listed
        0x8650000 size 20480 not black listed
        0x8710000 size 20480 not black listed
        0x8365000 size 20480 not black listed
        0x8383000 size 20480 not black listed
        0x838a000 size 20480 not black listed
        0x8398000 size 20480 not black listed
Free list 6 (Total size 1351680):
        0xc422000 size 24576 not black listed
        0xc642000 size 24576 not black listed
        0xc672000 size 24576 not black listed
        0xc6d2000 size 24576 not black listed
        0xc7cc000 size 24576 not black listed
        0xc0aa000 size 24576 not black listed
        0xc0c1000 size 24576 not black listed
        0xc1d0000 size 24576 not black listed
        0xc2ba000 size 24576 not black listed
        0x9cf4000 size 24576 not black listed
        0x9eca000 size 24576 not black listed
        0x9943000 size 24576 not black listed
        0x9a6b000 size 24576 not black listed
        0x9aa1000 size 24576 not black listed
        0x940e000 size 24576 not black listed
        0x95b2000 size 24576 not black listed
        0x95d2000 size 24576 not black listed
        0x9697000 size 24576 not black listed
        0x9029000 size 24576 not black listed
        0x90d5000 size 24576 not black listed
        0x9143000 size 24576 not black listed
        0x915f000 size 24576 not black listed
        0x91ad000 size 24576 not black listed
        0x91ba000 size 24576 not black listed
        0x9251000 size 24576 not black listed
        0x931a000 size 24576 not black listed
        0x936f000 size 24576 not black listed
        0x937f000 size 24576 not black listed
        0x8da1000 size 24576 not black listed
        0x8db3000 size 24576 not black listed
        0x8e02000 size 24576 not black listed
        0x8e85000 size 24576 not black listed
        0x8fc4000 size 24576 not black listed
        0x885b000 size 24576 not black listed
        0x894c000 size 24576 not black listed
        0x89fa000 size 24576 not black listed
        0x8be9000 size 24576 not black listed
        0x845e000 size 24576 not black listed
        0x84ff000 size 24576 not black listed
        0x850a000 size 24576 not black listed
        0x8535000 size 24576 not black listed
        0x85a9000 size 24576 not black listed
        0x85b0000 size 24576 not black listed
        0x85e7000 size 24576 not black listed
        0x8656000 size 24576 not black listed
        0x86ca000 size 24576 not black listed
        0x86e7000 size 24576 not black listed
        0x871b000 size 24576 not black listed
        0x872c000 size 24576 not black listed
        0x8748000 size 24576 not black listed
        0x8754000 size 24576 not black listed
        0x875b000 size 24576 not black listed
        0x8350000 size 24576 not black listed
        0x8391000 size 24576 not black listed
        0x83f9000 size 24576 not black listed
Free list 7 (Total size 1318912):
        0xc7fd000 size 28672 partially black listed
        0xc407000 size 28672 not black listed
        0xc544000 size 28672 not black listed
        0xc66a000 size 28672 not black listed
        0xc6dc000 size 28672 not black listed
        0xc6e9000 size 28672 not black listed
        0xc748000 size 28672 not black listed
        0xc7ea000 size 28672 not black listed
        0xc7f5000 size 28672 not black listed
        0xc0b1000 size 28672 not black listed
        0xc0b9000 size 28672 not black listed
        0xc31a000 size 28672 partially black listed
        0x9c9a000 size 28672 not black listed
        0x9d60000 size 28672 not black listed
        0x9919000 size 28672 not black listed
        0x9b07000 size 28672 not black listed
        0x9b0f000 size 28672 not black listed
        0x9b3a000 size 28672 not black listed
        0x9428000 size 28672 not black listed
        0x9439000 size 28672 not black listed
        0x9467000 size 28672 not black listed
        0x9479000 size 28672 not black listed
        0x95a4000 size 28672 not black listed
        0x97bd000 size 28672 not black listed
        0x97e5000 size 28672 not black listed
        0x90a1000 size 28672 not black listed
        0x912c000 size 28672 not black listed
        0x91c1000 size 28672 not black listed
        0x9386000 size 28672 not black listed
        0x8d89000 size 28672 not black listed
        0x8d94000 size 28672 not black listed
        0x8fbc000 size 28672 not black listed
        0x8fd5000 size 28672 not black listed
        0x8813000 size 28672 not black listed
        0x8a6e000 size 28672 not black listed
        0x8424000 size 28672 not black listed
        0x84ad000 size 28672 not black listed
        0x84bd000 size 28672 not black listed
        0x8595000 size 28672 not black listed
        0x86ad000 size 28672 not black listed
        0x86d9000 size 28672 not black listed
        0x876b000 size 28672 not black listed
        0x878e000 size 28672 not black listed
        0x87a7000 size 28672 not black listed
        0x87c6000 size 28672 not black listed
        0x8335000 size 28672 not black listed
Free list 8 (Total size 884736):
        0xc80a000 size 32768 not black listed
        0xc40f000 size 32768 not black listed
        0xc632000 size 32768 not black listed
        0xc6b2000 size 32768 not black listed
        0xc712000 size 32768 not black listed
        0xc75c000 size 32768 not black listed
        0xc295000 size 32768 not black listed
        0x9ebf000 size 32768 not black listed
        0x9935000 size 32768 not black listed
        0x9470000 size 32768 not black listed
        0x968c000 size 32768 not black listed
        0x97b1000 size 32768 not black listed
        0x97f6000 size 32768 not black listed
        0x900e000 size 32768 not black listed
        0x9017000 size 32768 not black listed
        0x926b000 size 32768 not black listed
        0x8892000 size 32768 not black listed
        0x895e000 size 32768 not black listed
        0x89d2000 size 32768 not black listed
        0x8469000 size 32768 not black listed
        0x85cd000 size 32768 not black listed
        0x8643000 size 32768 not black listed
        0x873f000 size 32768 not black listed
        0x87e7000 size 32768 not black listed
        0x8357000 size 32768 not black listed
        0x839f000 size 32768 not black listed
        0x83c1000 size 32768 not black listed
Free list 9 (Total size 884736):
        0xc785000 size 36864 not black listed
        0xc2b0000 size 36864 not black listed
        0xc37d000 size 36864 partially black listed
        0x9e0b000 size 36864 not black listed
        0x95c2000 size 36864 not black listed
        0x97c6000 size 36864 not black listed
        0x9258000 size 36864 not black listed
        0x93d4000 size 36864 not black listed
        0x8cf7000 size 36864 not black listed
        0x8e19000 size 36864 not black listed
        0x8fa1000 size 36864 not black listed
        0x8fe5000 size 36864 not black listed
        0x87ff000 size 36864 partially black listed
        0x8809000 size 36864 not black listed
        0x882e000 size 36864 not black listed
        0x89b3000 size 36864 not black listed
        0x8aec000 size 36864 not black listed
        0x8482000 size 36864 not black listed
        0x84c5000 size 36864 not black listed
        0x8550000 size 36864 not black listed
        0x8617000 size 36864 not black listed
        0x8664000 size 36864 not black listed
        0x87af000 size 36864 not black listed
        0x83d4000 size 36864 not black listed
Free list 10 (Total size 491520):
        0xc707000 size 40960 not black listed
        0xc7a0000 size 40960 not black listed
        0x9c06000 size 40960 not black listed
        0x9ca2000 size 40960 not black listed
        0x9151000 size 40960 not black listed
        0x8d62000 size 40960 not black listed
        0x8dc4000 size 40960 not black listed
        0x8e53000 size 40960 not black listed
        0x8ff6000 size 40960 not black listed
        0x84ee000 size 40960 not black listed
        0x85fc000 size 40960 not black listed
        0x83ec000 size 40960 not black listed
Free list 11 (Total size 315392):
        0x9a95000 size 45056 not black listed
        0xc51a000 size 45056 not black listed
        0xc73c000 size 45056 not black listed
        0xc7c0000 size 45056 not black listed
        0xc7dd000 size 45056 not black listed
        0xc0ce000 size 45056 not black listed
        0x8701000 size 45056 not black listed
Free list 12 (Total size 98304):
        0x87ce000 size 49152 not black listed
        0x83ad000 size 49152 not black listed
Free list 13 (Total size 692224):
        0xc287000 size 53248 not black listed
        0xc30c000 size 53248 not black listed
        0x97d1000 size 53248 not black listed
        0x9171000 size 53248 not black listed
        0x9393000 size 53248 not black listed
        0x8ce4000 size 53248 not black listed
        0x8e0b000 size 53248 not black listed
        0x8883000 size 53248 not black listed
        0x89e3000 size 53248 not black listed
        0x840c000 size 53248 not black listed
        0x868a000 size 53248 not black listed
        0x86bc000 size 53248 not black listed
        0x8780000 size 53248 not black listed
Free list 14 (Total size 573440):
        0xc52f000 size 57344 not black listed
        0xc0f0000 size 57344 not black listed
        0xc2a1000 size 57344 not black listed
        0x9ead000 size 57344 not black listed
        0x9502000 size 57344 not black listed
        0x95db000 size 57344 not black listed
        0x9032000 size 57344 not black listed
        0x9282000 size 57344 not black listed
        0x886b000 size 57344 partially black listed
        0x8495000 size 57344 not black listed
Free list 26 (Total size 106496):
        0x90f2000 size 106496 not black listed
Free list 33 (Total size 376832):
        0x8bff000 size 188416 not black listed
        0x8e23000 size 188416 not black listed
Free list 34 (Total size 626688):
        0xc679000 size 204800 not black listed
        0x8ee9000 size 212992 partially black listed
        0x8561000 size 208896 not black listed
Free list 35 (Total size 966656):
        0x9cb4000 size 237568 not black listed
        0x9973000 size 237568 not black listed
        0x9041000 size 258048 not black listed
        0x9325000 size 233472 not black listed
Free list 36 (Total size 1376256):
        0xc2c9000 size 270336 partially black listed
        0xc333000 size 286720 partially black listed
        0x9d0a000 size 282624 partially black listed
        0x9aa8000 size 262144 not black listed
        0x8e8c000 size 274432 not black listed
Free list 37 (Total size 638976):
        0x9e29000 size 319488 not black listed
        0x8f32000 size 319488 not black listed
Free list 38 (Total size 999424):
        0xc429000 size 335872 not black listed
        0x9a11000 size 327680 not black listed
        0x8a1b000 size 335872 not black listed
Free list 40 (Total size 1208320):
        0x99b0000 size 393216 not black listed
        0x91d2000 size 421888 not black listed
        0x8d01000 size 393216 partially black listed
Free list 41 (Total size 438272):
        0xc154000 size 438272 partially black listed
Free list 42 (Total size 1445888):
        0xc20f000 size 487424 not black listed
        0x948a000 size 487424 not black listed
        0x8a76000 size 471040 not black listed
Free list 43 (Total size 1507328):
        0xc387000 size 520192 partially black listed
        0x9c11000 size 491520 not black listed
        0x952a000 size 495616 not black listed
Free list 44 (Total size 1581056):
        0xc47c000 size 524288 not black listed
        0x9d87000 size 528384 partially black listed
        0x9298000 size 528384 partially black listed
Free list 45 (Total size 573440):
        0xc55c000 size 573440 not black listed
Free list 48 (Total size 659456):
        0x95ea000 size 659456 not black listed
Free list 49 (Total size 700416):
        0x8c38000 size 700416 not black listed
Free list 53 (Total size 819200):
        0x983d000 size 819200 partially black listed
Free list 57 (Total size 958464):
        0x8afb000 size 958464 partially black listed
Free list 60 (Total size 36118528):
        0x96a9000 size 1077248 not black listed
        0x9edc000 size 35041280 partially black listed
Total of 60502016 bytes on free list

-- 
 address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]