Wireshark-dev: Re: [Wireshark-dev] New packet list - out of memory?
From: "Anders Broman" <anders.broman@xxxxxxxxxxxx>
Date: Mon, 5 Oct 2009 17:08:49 +0200
Hi,
Experimenting loading the file there is 163 calls to VirtualAlloc()
~1.630 GB memory used
Changing 
#define EMEM_ALLOCS_PER_CHUNK (EMEM_PACKET_CHUNK_SIZE / 512)
to:
#define EMEM_ALLOCS_PER_CHUNK (EMEM_PACKET_CHUNK_SIZE / 64)

Gives only 26 VirtualAlloc() so it seems like we waist a huge amount of
memory...
15 VirtualAlloc() with 32 bytes.

Is there a reason not to change to:
#define EMEM_ALLOCS_PER_CHUNK (EMEM_PACKET_CHUNK_SIZE / 32) ?

Loading is actually 2s slower with se_alloc for col_text...
Are we better off using glibs memory functions?

Regards
Anders

________________________________

From: wireshark-dev-bounces@xxxxxxxxxxxxx
[mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Anders Broman
Sent: den 5 oktober 2009 12:32
To: Developer support list for Wireshark
Subject: [Wireshark-dev] New packet list - out of memory?



 Hi, 
 I got a 146 Mbyte trace file, loading it with the new 
 packet list WS blows up "Out of memory" i in emem.c (~line 353) 
 Looking in the task manager 279 216K s allcated. Using my second 
 build without the new packet list The file loads fine using 492 304K. 

Changing se_alloc to g_slice_alloc0 for fdata->col_text(file.c) etc the
file loads fine. 
Using 318 236K Loading time 55.459 with old packet list 47.846 :( 

Something must be wrong with se_alloc? Ideas? 

Regards 
Anders