Make releaseMemory private and return byte array instead, fix other platform compilation issues, reduce in-memory chunk size.

This commit is contained in:
j.laycock
2019-10-01 12:21:44 +01:00
parent d5f5acb734
commit eb27c2b037
4 changed files with 24 additions and 27 deletions

View File

@@ -25,16 +25,16 @@ type MemoryMap struct {
var FileMemoryMap = make(map[string]*MemoryMap)
func (mMap *MemoryMap) CreateMemoryMap(file *os.File, maxLength uint64) {
}
func (mMap *MemoryMap) WriteMemory(offset uint64, length uint64, data []byte) {
}
func (mMap *MemoryMap) ReadMemory(offset uint64, length uint64) (MemoryBuffer, error) {
return MemoryBuffer{}, fmt.Errorf("Memory Map not implemented for this platform")
}
func (mBuffer *MemoryBuffer) ReleaseMemory() {
func (mMap *MemoryMap) ReadMemory(offset uint64, length uint64) ([]byte, error) {
dataSlice := []byte{}
return dataSlice, fmt.Errorf("Memory Map not implemented for this platform")
}
func (mBuffer *MemoryMap) DeleteFileAndMemoryMap() {