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

Side by Side Diff: src/pkg/runtime/mem_windows.c

Issue 5490053: code review 5490053: runtime: make more build-friendly (Closed)
Patch Set: diff -r 046739c8299b https://go.googlecode.com/hg/ Created 13 years, 3 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:
View unified diff | Download patch
« no previous file with comments | « src/pkg/runtime/mem_plan9.c ('k') | src/pkg/runtime/memmove_386.s » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Go Authors. All rights reserved. 1 // Copyright 2010 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 #include "runtime.h" 5 #include "runtime.h"
6 #include "arch.h" 6 #include "arch_GOARCH.h"
7 #include "os.h" 7 #include "os_GOOS.h"
8 #include "defs.h" 8 #include "defs_GOOS_GOARCH.h"
9 #include "malloc.h" 9 #include "malloc.h"
10 10
11 enum { 11 enum {
12 MEM_COMMIT = 0x1000, 12 MEM_COMMIT = 0x1000,
13 MEM_RESERVE = 0x2000, 13 MEM_RESERVE = 0x2000,
14 MEM_RELEASE = 0x8000, 14 MEM_RELEASE = 0x8000,
15 ········ 15 ········
16 PAGE_EXECUTE_READWRITE = 0x40, 16 PAGE_EXECUTE_READWRITE = 0x40,
17 }; 17 };
18 18
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void 62 void
63 runtime·SysMap(void *v, uintptr n) 63 runtime·SysMap(void *v, uintptr n)
64 { 64 {
65 void *p; 65 void *p;
66 ········ 66 ········
67 mstats.sys += n; 67 mstats.sys += n;
68 p = runtime·stdcall(runtime·VirtualAlloc, 4, v, n, (uintptr)MEM_COMMIT, (uintptr)PAGE_EXECUTE_READWRITE); 68 p = runtime·stdcall(runtime·VirtualAlloc, 4, v, n, (uintptr)MEM_COMMIT, (uintptr)PAGE_EXECUTE_READWRITE);
69 if(p != v) 69 if(p != v)
70 runtime·throw("runtime: cannot map pages in arena address space" ); 70 runtime·throw("runtime: cannot map pages in arena address space" );
71 } 71 }
OLDNEW
« no previous file with comments | « src/pkg/runtime/mem_plan9.c ('k') | src/pkg/runtime/memmove_386.s » ('j') | no next file with comments »

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