Thema: Delphi TFileStream.Memory?

Einzelnen Beitrag anzeigen

Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.287 Beiträge
 
Delphi 12 Athens
 
#5

Re: TFileStream.Memory?

  Alt 2. Mai 2008, 16:37
Zitat:
aber kann ja auch nicht schaden sich sowas mal anzuschauen
http://www.delphipraxis.net/internal...=879295#879295
im Anhang sind einige Streams drin (samt Einem mit MMF)

und auch wenn sie auf Record's aufbauen, lassen sie sich bestimmt leicht in Objekte umwandeln (falls nötig)

oder Bei Google suchenmemory mapped stream [google]*memorymappedstream[/google]
http://www.vclcomponents.com/Delphi/...eams-info.html




PS: Ein Problem bei MMFs ist, daß man die Position der Datei nicht frei im RAM positionieren kann.
Genauer, man kann nicht jede beliebige Dateiposition an den Anfang des gemappten Speichersblocks legen,
drum verschiebt sich die MapPosition abhängig zur Dateiposition im RAM und auch die MAP-Größe paßt sich dynamisch an.
Zitat:
MSDN-Library durchsuchenMapViewOfFile
The combination of the high and low offsets must specify an offset within the file mapping. They must also match the memory allocation granularity of the system. That is, the offset must be a multiple of the allocation granularity. To obtain the memory allocation granularity of the system, use the GetSystemInfo function, which fills in the members of a SYSTEM_INFO structure.
Ein Therapeut entspricht 1024 Gigapeut.
  Mit Zitat antworten Zitat