memory_other.go 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. // +build !windows
  2. package vmem
  3. // Memory represents a raw block of memory.
  4. type Memory struct {
  5. data []byte
  6. }
  7. // GetPageSize returns the size of a memory page.
  8. func GetPageSize() uint64 {
  9. panic("not implemented")
  10. }
  11. // Alloc allocates memory at addr of size with allocType and protect.
  12. // It returns nil if it fails.
  13. func Alloc(addr, size uint64, allocType, protect int) *Memory {
  14. panic("not implemented")
  15. }
  16. // Get returns a range of existing memory. If the range is not a block of
  17. // allocated memory, the returned memory will pagefault when accessed.
  18. func Get(addr, size uint64) *Memory {
  19. panic("not implemented")
  20. }
  21. // Free frees the block of memory.
  22. func (m *Memory) Free() {
  23. panic("not implemented")
  24. }
  25. // Addr returns the actual address of the memory.
  26. func (m *Memory) Addr() uint64 {
  27. panic("not implemented")
  28. }
  29. // Read implements the io.Reader interface.
  30. func (m *Memory) Read(b []byte) (n int, err error) {
  31. panic("not implemented")
  32. }
  33. // ReadAt implements the io.ReaderAt interface.
  34. func (m *Memory) ReadAt(b []byte, off int64) (n int, err error) {
  35. panic("not implemented")
  36. }
  37. // Write implements the io.Writer interface.
  38. func (m *Memory) Write(b []byte) (n int, err error) {
  39. panic("not implemented")
  40. }
  41. // WriteAt implements the io.WriterAt interface.
  42. func (m *Memory) WriteAt(b []byte, off int64) (n int, err error) {
  43. panic("not implemented")
  44. }
  45. // Seek implements the io.Seeker interface.
  46. func (m *Memory) Seek(offset int64, whence int) (int64, error) {
  47. panic("not implemented")
  48. }
  49. // Protect changes the memory protection for a range of memory.
  50. func (m *Memory) Protect(addr, size uint64, protect int) error {
  51. panic("not implemented")
  52. }
  53. // Clear sets all bytes in the memory block to zero.
  54. func (m *Memory) Clear() {
  55. panic("not implemented")
  56. }