summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/tiny/mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/tiny/mem.c')
-rw-r--r--src/pkg/runtime/tiny/mem.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/pkg/runtime/tiny/mem.c b/src/pkg/runtime/tiny/mem.c
deleted file mode 100644
index 7abecfba0..000000000
--- a/src/pkg/runtime/tiny/mem.c
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "runtime.h"
-#include "malloc.h"
-
-// Assume there's an arbitrary amount of memory starting at "end".
-// Sizing PC memory is beyond the scope of this demo.
-
-static byte *allocp;
-
-void*
-runtime·SysAlloc(uintptr ask)
-{
- extern byte end[];
- byte *q;
-
- if(allocp == nil) {
- allocp = end;
- allocp += 7 & -(uintptr)allocp;
- }
- ask += 7 & -ask;
-
- q = allocp;
- allocp += ask;
- runtime·memclr(q, ask);
- return q;
-}
-
-void
-runtime·SysFree(void *v, uintptr n)
-{
- // Push pointer back if this is a free
- // of the most recent SysAlloc.
- n += 7 & -n;
- if(allocp == (byte*)v+n)
- allocp -= n;
-}
-
-void
-runtime·SysUnused(void *v, uintptr n)
-{
- USED(v, n);
-}
-
-void
-runtime·SysMemInit(void)
-{
-}