Autor | Thema: Flags | | Datum:11.09.02 22:20 
| |
Hallo Roland,
welche dieser Flags setzt Profan's Dim Befehl ?
GMEM_FIXED Allocates fixed memory. This flag cannot be combined with the GMEM_MOVEABLE or GMEM_DISCARDABLE flag. The return value is a pointer to the memory block. To access the memory, the calling process simply casts the return value to a pointer.
GMEM_MOVEABLE Allocates movable memory. This flag cannot be combined with the GMEM_FIXED flag. The return value is the handle of the memory object. The handle is a 32-bit quantity that is private to the calling process. To translate the handle into a pointer, use the GlobalLock function.
GPTR Combines the GMEM_FIXED and GMEM_ZEROINIT flags.
GHND Combines the GMEM_MOVEABLE and GMEM_ZEROINIT flags.
GMEM_DDESHARE Allocates memory to be used by the dynamic data exchange (DDE) functions for a DDE conversation. Unlike Windows version 3. x, this memory is not shared globally. However, this flag is available for compatibility purposes. It may be used by some applications to enhance the performance of DDE operations and should, therefore, be specified if the memory is to be used for DDE. Only processes that use DDE or the clipboard for interprocess communications should specify this flag.
GMEM_DISCARDABLE Allocates discardable memory. This flag cannot be combined with the GMEM_FIXED flag. Some Win32-based applications may ignore this flag.
GMEM_LOWER Ignored. This flag is provided only for compatibility with Windows version 3. x.
GMEM_NOCOMPACT Does not compact or discard memory to satisfy the allocation request.
GMEM_NODISCARD Does not discard memory to satisfy the allocation request.
GMEM_NOT_BANKED Ignored. This flag is provided only for compatibility with Windows version 3. x.
GMEM_NOTIFY Ignored. This flag is provided only for compatibility with Windows version 3. x.
GMEM_SHARE Same as the GMEM_DDESHARE flag.
GMEM_ZEROINIT Initializes memory contents to zero.
Gruß, Frank
|
| | Datum:12.09.02 08:38 
(rgh-soft@t-online.de) | |
Hallo Frank,
ich verwende die Delphi-Funktion "GetMem". Flags werden da nicht angegeben. Ich gebe lediglich an, wieviel Speicher ich brauche. Wie es nun intern in Delphi gelöst ist, weiß ich nicht auswendig.
Gruß
Roland
|
| | Datum:12.09.02 09:19 
| |
Danke, Roland.
Weißt du denn, ob bei allen Profan-Versionen der Speicher automatisch beim Allokieren gelöscht wird (GMEM_ZEROINIT) ?
Gruß, Frank
|
| | Datum:16.09.02 14:05 
| |
Hallo Roland,
kannst du die letzt Frage bitte noch beantworten ?
Gruß, Frank
|
| | Datum:16.09.02 16:39 
(rgh-soft@t-online.de) | |
Hallo Frank,
wie schon erwähnt benutze ich bei DIM Bereich# die GETMEM-Funktion von Delphi, mehr nicht. Ich nehme aber nicht an, daß diese den Bereich auch auf 0 setzt. Das erledigt aber problemlos der Befehl CLEAR Bereich#, der seit PROFAN 7 die Funktion ZEROMEMORY aufruft und daher nun absolut schnell ist.
Gruß
Roland
|
| | Datum:16.09.02 20:29 
| |
Hallo,
und danke, Roland.
Klar kenne ich Clear, wollte ja nur generell fragen.
Delphi ist wohl nicht in allen Dingen sehr flexibel, was ;-)) ?
Gruß, Frank
|
| | Datum:16.09.02 20:38 
(rgh-soft@t-online.de) | |
Delphi ist schon flexibel. Natürlich kann man auch die ganzen API-Funktionen benutzen ... man muß aber nicht! ;-)
Gruß
Roland
|
| | Datum:17.09.02 08:23 
(schmidts@flat2serv.de) | |
Hallo Frank,
ich habe mal in den Sourcen von Delphi gesucht (bzw. in den VCL-Sourcen), bin aber nicht so recht fündig geworden. Teile basieren auf Assembler. Welche Funktionen aber aufgerufen werden, konnte ich nicht rausfinden (der ASM Teil ruft auch nur Funktionen auf). Das Problem ist, dass Borland vieles selbst implementiert, um Microsoft-Bugs zu umgehen, so z.B. auch den eigenen Memory-Manager BORMM.DLL (heisst, glaube ich, so). Delphi ist äußerst flexibel, übertreibt in Sachen Klassen aber manchmal ein wenig: Die kapseln wirklich alles in Klassen ;)
Mfg.
Sven Schmidts
|
| | Datum: 17.09.02 12:08 
| |
Hallo,
danke für die Info's, Sven !
> Delphi ist äußerst flexibel, übertreibt in Sachen Klassen aber manchmal ein wenig: Die kapseln wirklich alles in Klassen ;)
Deswegen ist mir Assembler auch sehr viel lieber, das ist so herrlich primitiv und flexibler geht's kaum noch...
Gruß, Frank
|
|
|