amiga-news DEUTSCHE VERSION
.
Links| Forums| Comments| Report news
.
Chat| Polls| Newsticker| Archive
.

amiga-news.de Forum > Programmierung > Memorypools [ - Search - New posts - Register - Login - ]

-1- [ - Post reply - ]

2003-06-15, 19:45 h

StefanHaegele
Posts: 281
User
Hallo,

darf ein Memorypool von verschiedenen Tasks benutzt werden, oder muß jeder Task seinen eigenen Memorypool öffnen ?

Der Hintergrund ist der, dass ich in einem Device für jede Unit wenn möglich nur einen Memorypool anlegen möchte.

Danke
Stefan
--
Faktura.net der neue Meilenstein für Bürosoftware. Mehr unter http://www.haegele-online.net

[ - Answer - Quote - Direct link - ]

2003-06-15, 20:09 h

thomas
Posts: 7717
User

Hier ist ein Zitat aus den AllocPooled() AutoDocs:

Zitat:
NOTES
The pool function do not protect an individual pool from
multiple accesses. The reason is that in most cases the pools
will be used by a single task. If your pool is going to
be used by more than one task you must Semaphore protect
the pool from having more than one task trying to allocate
within the same pool at the same time. Warning: Forbid()
protection *will not work* in the future. *Do NOT* assume
that we will be able to make it work in the future. AllocPooled()
may well break a Forbid() and as such can only be protected
by a semaphore.


Das sagt eigentlich alles.

Gruß Thomas

--
Email: thomas-rapp@web.de
Home: home.t-online.de/home/thomas-rapp/

[ - Answer - Quote - Direct link - ]

2003-06-15, 20:54 h

StefanHaegele
Posts: 281
User
@Thomas

Danke, manchmal sollte man doch die Autodocs lesen

Stefan
--
Faktura.net der neue Meilenstein für Bürosoftware. Mehr unter http://www.faktura-online.net/html/faktura_net.html

[ - Answer - Quote - Direct link - ]

2003-06-18, 22:19 h

Georg
Posts: 107
User
In AROS und MorphOS kann man an CreatePool() das flag
MEMF_SEM_PROTECTED übergeben, wodurch AllocPooled()
und FreePooled() dann automatisch semaphore-geschützt
sind.


[ - Answer - Quote - Direct link - ]


-1- [ - Post reply - ]


amiga-news.de Forum > Programmierung > Memorypools [ - Search - New posts - Register - Login - ]


.
Masthead | Privacy policy | Netiquette | Advertising | Contact
Copyright © 1998-2024 by amiga-news.de - all rights reserved.
.