mirror of
https://github.com/rclone/rclone.git
synced 2024-11-24 12:26:44 +08:00
3a14b1d5a9
Needed to drop - azureblob backend - cache backend - qingstor backend - cachestats command - ncdu command
20 lines
583 B
Go
20 lines
583 B
Go
// Fallback Alloc and Free for unsupported OSes
|
|
|
|
// +build plan9 js
|
|
|
|
package mmap
|
|
|
|
// Alloc allocates size bytes and returns a slice containing them. If
|
|
// the allocation fails it will return with an error. This is best
|
|
// used for allocations which are a multiple of the Pagesize.
|
|
func Alloc(size int) ([]byte, error) {
|
|
return make([]byte, size), nil
|
|
}
|
|
|
|
// Free frees buffers allocated by Alloc. Note it should be passed
|
|
// the same slice (not a derived slice) that Alloc returned. If the
|
|
// free fails it will return with an error.
|
|
func Free(mem []byte) error {
|
|
return nil
|
|
}
|