Named memory

This forum is for general developer support questions.
Post Reply
User avatar
abalaban
Beta Tester
Beta Tester
Posts: 456
Joined: Mon Dec 20, 2010 2:09 pm
Location: France
Contact:

Named memory

Post by abalaban »

Can someone go into more details about named memory. I'd like to use it one application but I have to be sure of the features.

If I have understood correctly (correct me if I'm wrong):
- named memory blocks are classified in "Namespaces", if no namespace is specified at the allocation time a default one is provided,
- in a given namespace no memory block can share the same name, on the other hand a same name can be used in multiple namespace,
- it's better to Lock/Unlock blocks before modifying them,

But is there a way to loop though the whole blocks of a given namespace? FindNameMemory() does not provide such feature and I didn't find anything else.

My idea is to have an unknown number of (independent) worker tasks, each task writes some info about itself in a named memory block (let's say it will use its PID as a name) classified under a fixed namespace (let's say the name of my application). Now I'll have a monitoring application that would be able to list each worker task with its own info and possibly able to interact with them (force shutdown for example). I thought NamedMemory was well suited for this.
AmigaOne X1000 running AOS 4 beta
AmigaOne XE/G4
Amiga 1200/PPC 603e + BVision PPC
Post Reply