Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(476)

Delta Between Two Patch Sets: src/pkg/runtime/darwin/mem.c

Issue 2150042: code review 2150042: runtime: use manual stack for garbage collection (Closed)
Left Patch Set: code review 2150042: runtime: use manual stack for garbage collection Created 14 years, 6 months ago
Right Patch Set: code review 2150042: runtime: use manual stack for garbage collection Created 14 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/runtime/darwin/amd64/sys.s ('k') | src/pkg/runtime/debug.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(Both sides are equal)
1 #include "runtime.h" 1 #include "runtime.h"
2 #include "defs.h" 2 #include "defs.h"
3 #include "os.h" 3 #include "os.h"
4 #include "malloc.h" 4 #include "malloc.h"
5 5
6 void* 6 void*
7 SysAlloc(uintptr n) 7 SysAlloc(uintptr n)
8 { 8 {
9 mstats.sys += n; 9 mstats.sys += n;
10 return runtime_mmap(nil, n, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_ANON|MAP _PRIVATE, -1, 0); 10 return runtime_mmap(nil, n, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_ANON|MAP _PRIVATE, -1, 0);
11 } 11 }
12 12
13 void 13 void
14 SysUnused(void *v, uintptr n) 14 SysUnused(void *v, uintptr n)
15 { 15 {
16 USED(v); 16 USED(v);
17 USED(n); 17 USED(n);
18 // TODO(rsc): call madvise MADV_DONTNEED 18 // TODO(rsc): call madvise MADV_DONTNEED
19 } 19 }
20 20
21 void 21 void
22 SysFree(void *v, uintptr n) 22 SysFree(void *v, uintptr n)
23 { 23 {
24 runtime_munmap(v, n); 24 runtime_munmap(v, n);
25 } 25 }
26 26
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b