Wireshark-dev: Re: [Wireshark-dev] New packet list - out of memory?
From: "Anders Broman" <[email protected]>
Date: Wed, 7 Oct 2009 17:01:57 +0200
Hi,
If some one's interested here's the emem statistics for the file:
#define EMEM_ALLOCS_PER_CHUNK (EMEM_PACKET_CHUNK_SIZE / 64)
PWS	  Commit		
 43 492	     64 512	
332 052	    471 116	         
Loading time 54.740

-------- SE allocator statistics --------
Using chunks, using canaries
No fully used chunks, nothing to do

-------- SE allocator statistics --------
Using chunks, using canaries
No fully used chunks, nothing to do

-------- SE allocator statistics --------
Using chunks, using canaries

---------- Allocations from the OS ----------
---- Headers ----
        (    Chunk header size:         28
          + Canary header size:     819204)
        *     Number of chunks:         24
        -------------------------------------------
        = 19661568 total space used for headers

---- Buffer space ----
        Chunk allocation size:   10485760
        *    Number of chunks:         24
        -------------------------------------------
        = 251461632 (251658240 including guard pages) total space used for buffe
rs
        -------------------------------------------
Total allocated from OS: 271123200

---------- Allocations from the SE pool ----------
   Number of SE allocations:    3932160
Bytes used (incl. canaries):  144507024
    Bytes used for canaries:   35148246
      Bytes unused (wasted):  106954608

---------- Statistics ----------
Average SE allocation size (incl. canaries):  36.75
Average SE allocation size (excl. canaries):  27.81
        Average wasted bytes per allocation:  27.20
 Space used for headers + unused allocation: 107773840
--> % overhead/waste: 39.75

Allocation distribution (sizes include canaries):
size <    32:   697363
size <    64:  2547659
size <   128:   686123
size <   256:    20722
size <   512:      717
size <  1024:        0
size <  2048:        0
size <  4096:        0
size <  8192:        0
size > 16384:        4

Regards
Anders 

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of didier
Sent: den 7 oktober 2009 03:31
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] New packet list - out of memory?

Le mardi 06 octobre 2009 à 12:21 -0400, Jeff Morriss a écrit :

> Another question: do we really need to use se_ allocations here?  Do 
> we need the canaries or are we just using se_ allocations because they 
> get cleaned up for us "automatically?"
PacketListRecord size is 20 bytes (could be 16) and we are allocating a lot of them so yes using g_slice_new or g_malloc here make sense.

Using a g_string_chunk for frame data col_text too but it's not a problem here loading a file doesn't initialize a lot of them.

Didier
 
> 
> Should we have a new allocator without the canaries?


___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]?subject=unsubscribe