El 06/05/2013 18:10, Oodini escribió:
Hello,
I create a shared_memory_object, truncate it to set its size, and then create a mapped_region.
I would like to know it would be possible to append new data, by applying a new truncation.
Yes, if the underlying OS supports it (I think both Windows and POSIX guarantee this.
Also, is it possible to have a second name pointing in the same memory, but with an offset ?
Not a shared_memory_object (a shm object is similar to a file descriptor), but you can have a mapped_region pointing to the same memory starting in a different offset (mapped region always maps whole pages so you might end consuming a bit more memory than needed if the offset is not multiple of page size, but get_address() will return the address resulting from base address + the offset you specified). Best, Ion