Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Wireshark memory handling

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 5 Oct 2009 12:03:37 -0700

On Oct 5, 2009, at 11:46 AM, Jeff Morriss wrote:

It's been a while, but my memory says that while memory-mapped files are great, *growing* memory mapped files was (significantly) less pleasant.

Growing a memory-mapped file *and keeping the entire file mapped into a single contiguous area* isn't very pleasant.

If you don't have to keep the entire file mapped contiguously, it's much easier - ftruncate() to grow the file, and another mmap() call to map the new area on UN*X, probably similar calls on Windows.

Using a mapped file as backing store for memory allocations shouldn't require a single contiguous area.