|
Boost : |
From: Jason Hise (chaos_at_[hidden])
Date: 2005-08-02 12:56:36
I was researching how to ensure that a singleton has only one instance
within a loaded dll and came up with this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/using_shared_memory_in_a_dynamic_link_library.asp
The page has a lot of information, and while most of it makes a decent
amount of sense, a good deal of it is still unfamiliar territory for
me. So I have a few of questions.
A) Security Attributes. How important are they? Is it ok to just use
null for this parameter, or should I be researching this structure and
its effects in depth?
B) Size of shared memory. It appears that the 'pseudo file' being used
as shared memory is fixed in size and thus I have to guess how much I
might need at compile time. Is there a way to resize this file if need be?
C) Allocating and deallocating the memory. Is there existing code out
there that takes a buffer of memory like this and manages malloc/free
like calls to it (possibly wrapping the functionality in a std
allocator) or do I need to roll my own?
-Jason
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk