Help on mmap (with pointers)

From: mshetty (mshetty_at_mail.com)
Date: 02/25/04


Date: 25 Feb 2004 05:31:28 -0800

Hi,

If I have a data structure with pointers that want to memory map into
a file. How exactly do I do this?
Would help if could get an example/sample on how it could be done. I
read that this could be achieved by storing offsets. How exactly is
this done? Unable to understand.

Thanks and Regards,
M Shetty



Relevant Pages

  • Re: Java
    ... >> exactly how you mean pointers in this more general sense either. ... if in ML you represent a simple data structure like a binary ... > shared between tree or within the same tree, ... ourselves to purely functional programming ...
    (comp.programming)
  • Re: data structures on shared memory?
    ... > I've got a bit of a complex data structure based on linked lists, ... If the shared memory occupies the same set of virtual ... The second principal method is to give up on pointers ... and use offsets instead. ...
    (comp.unix.programmer)
  • Re: PInvoke an old DLL file
    ... members in the structure which are not standard types (what is Rescode_t for ... which act as the pointers. ... If you have to allocate the memory for these structures before you ... pass in a data structure and get a data structure returned back. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: serializing an arbitrary data structure into a flat buffer (raw contiguous memory block)
    ... a message must store a non-linear data structure (i.e. ... > "payload") using pointers. ... So the obvious solution is to have your serialization process replace ... and a reverse map while deserializing. ...
    (comp.lang.c)
  • Re: Simple question, err... I think
    ... As I said "there's no deallocation for these RB trees". ... AFAIK my code did not generate any invalid pointers. ... This data structure can only grow, ...
    (comp.programming)