Thread View: comp.os.ms-windows.programmer.memory
1 messages
1 total messages
Started by Blake Streeter
Fri, 03 Nov 1995 18:42
NT: Using Mem. Map. Files to Share Dynamic Memory?
Author: Blake Streeter
Date: Fri, 03 Nov 1995 18:42
Date: Fri, 03 Nov 1995 18:42
43 lines
2153 bytes
2153 bytes
Dynamic Shared Memory in DLL using MMF:
Hello,
I'm having a problem figuring something out.
I'm designing a system Using Visual C++ 2.0 for 32 bit
Windows NT.
I want to create and share a DYNAMIC List of messages in
a DLL. Multiple tasks will have to add-to and remove-from this
list. I've read several articles on the Microsoft Developers
Network CD discussing Shared memory in DLL's. This also led me
to Memory Mapping files (MMF). I've read, and I think I understand,
how to use MMF for sharing memory.
But there is still one thing I don't understand :
Once I have created, or opened this Named MMF in each task
that attaches to the DLL how do I get my DLL Add-To-List Function
to allocate a block of memory within my MMF just big enough for a
Message List Entry? (Which happens to be a structure) So that once
I assign the data to the memory every task can see and access it?
How do I get my Remove-From-List function to deallocate this small
block of memory so that it can be used again?
Do I have to do the Memory Management within the MMF myself?
Doesn't memory access fall only on page boundries? (i.e. 4096 bytes)
What If I want to have multiple instances of my list each
containing different messages within the DLL? Would I have to
create a MMF for each list?
Thanks in advance for any and all help you can give me.
Please Respond Via Email Because I don't read all the groups
I'm posting to.
Thank you,
Blake Streeter
bstreete@ic1d.harris.com
Harris corporation.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads