amiga-news ENGLISH VERSION
.
Links| Forum| Kommentare| News melden
.
Chat| Umfragen| Newsticker| Archiv
.

amiga-news.de Forum > Programmierung > Memorypools [ - Suche - Neue Beiträge - Registrieren - Login - ]

-1- [ - Beitrag schreiben - ]

15.06.2003, 19:45 Uhr

StefanHaegele
Posts: 281
Nutzer
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

[ - Antworten - Zitieren - Direktlink - ]

15.06.2003, 20:09 Uhr

thomas
Posts: 7717
Nutzer

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/

[ - Antworten - Zitieren - Direktlink - ]

15.06.2003, 20:54 Uhr

StefanHaegele
Posts: 281
Nutzer
@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

[ - Antworten - Zitieren - Direktlink - ]

18.06.2003, 22:19 Uhr

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


[ - Antworten - Zitieren - Direktlink - ]


-1- [ - Beitrag schreiben - ]


amiga-news.de Forum > Programmierung > Memorypools [ - Suche - Neue Beiträge - Registrieren - Login - ]


.
Impressum | Datenschutzerklärung | Netiquette | Werbung | Kontakt
Copyright © 1998-2024 by amiga-news.de - alle Rechte vorbehalten.
.