aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/linux/mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/linux/mem.c')
-rw-r--r--src/pkg/runtime/linux/mem.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/pkg/runtime/linux/mem.c b/src/pkg/runtime/linux/mem.c
index 925e7fd342..9bf054a210 100644
--- a/src/pkg/runtime/linux/mem.c
+++ b/src/pkg/runtime/linux/mem.c
@@ -4,26 +4,26 @@
#include "malloc.h"
void*
-SysAlloc(uintptr n)
+runtime·SysAlloc(uintptr n)
{
void *p;
mstats.sys += n;
- p = runtime_mmap(nil, n, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_ANON|MAP_PRIVATE, -1, 0);
+ p = runtime·mmap(nil, n, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_ANON|MAP_PRIVATE, -1, 0);
if(p < (void*)4096) {
if(p == (void*)EACCES) {
- printf("mmap: access denied\n");
- printf("If you're running SELinux, enable execmem for this process.\n");
- exit(2);
+ runtime·printf("mmap: access denied\n");
+ runtime·printf("If you're running SELinux, enable execmem for this process.\n");
+ runtime·exit(2);
}
- printf("mmap: errno=%p\n", p);
- throw("mmap");
+ runtime·printf("mmap: errno=%p\n", p);
+ runtime·throw("mmap");
}
return p;
}
void
-SysUnused(void *v, uintptr n)
+runtime·SysUnused(void *v, uintptr n)
{
USED(v);
USED(n);
@@ -31,14 +31,14 @@ SysUnused(void *v, uintptr n)
}
void
-SysFree(void *v, uintptr n)
+runtime·SysFree(void *v, uintptr n)
{
mstats.sys -= n;
- runtime_munmap(v, n);
+ runtime·munmap(v, n);
}
void
-SysMemInit(void)
+runtime·SysMemInit(void)
{
// Code generators assume that references to addresses
// on the first page will fault. Map the page explicitly with
@@ -46,5 +46,5 @@ SysMemInit(void)
// allocating that page as the virtual address space fills.
// Ignore any error, since other systems might be smart
// enough to never allow anything there.
- runtime_mmap(nil, 4096, PROT_NONE, MAP_FIXED|MAP_ANON|MAP_PRIVATE, -1, 0);
+ runtime·mmap(nil, 4096, PROT_NONE, MAP_FIXED|MAP_ANON|MAP_PRIVATE, -1, 0);
}