[Gambas-bugtracker] Bug #2534: Libc mmap() call always returns -1
bugtracker at gambaswiki.org
bugtracker at gambaswiki.org
Sat Apr 30 22:31:24 CEST 2022
http://gambaswiki.org/bugtracker/edit?object=BUG.2534&from=L21haW4-
Comment #9 by Brian G:
writing:
mfile = Memory MemPointer For Write
Write #mFile, Data As Object
LastWriteLength = Seek(mFile)
Close mFile
reading:
mfile = Memory MemPointer For Read
Try MyObject = Read #mFile As Object
If Error Then Print #File.err, "Object read failed"
LastWriteLength = Seek(mFile)
Close mFile
Return MyObject
MemPointer id a pointer into the shared memsegment
all other variable types use @ notation to read the value
and memcpy to write the value
More information about the Bugtracker
mailing list