Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2042)

Side by Side Diff: src/base/platform/platform-solaris.cc

Issue 2245703002: Solaris/OpenBSD/FreeBSD: [heap] Uncommit unused large object page memory. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/base/platform/platform-openbsd.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Platform-specific code for Solaris 10 goes here. For the POSIX-compatible 5 // Platform-specific code for Solaris 10 goes here. For the POSIX-compatible
6 // parts, the implementation is in platform-posix.cc. 6 // parts, the implementation is in platform-posix.cc.
7 7
8 #ifdef __sparc 8 #ifdef __sparc
9 # error "V8 does not support the SPARC CPU architecture." 9 # error "V8 does not support the SPARC CPU architecture."
10 #endif 10 #endif
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 bool VirtualMemory::UncommitRegion(void* base, size_t size) { 192 bool VirtualMemory::UncommitRegion(void* base, size_t size) {
193 return mmap(base, 193 return mmap(base,
194 size, 194 size,
195 PROT_NONE, 195 PROT_NONE,
196 MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE | MAP_FIXED, 196 MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE | MAP_FIXED,
197 kMmapFd, 197 kMmapFd,
198 kMmapFdOffset) != MAP_FAILED; 198 kMmapFdOffset) != MAP_FAILED;
199 } 199 }
200 200
201 bool VirtualMemory::ReleasePartialRegion(void* base, size_t size,
202 void* free_start, size_t free_size) {
203 return munmap(free_start, free_size) == 0;
204 }
201 205
202 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { 206 bool VirtualMemory::ReleaseRegion(void* base, size_t size) {
203 return munmap(base, size) == 0; 207 return munmap(base, size) == 0;
204 } 208 }
205 209
206 210
207 bool VirtualMemory::HasLazyCommits() { 211 bool VirtualMemory::HasLazyCommits() {
208 // TODO(alph): implement for the platform. 212 // TODO(alph): implement for the platform.
209 return false; 213 return false;
210 } 214 }
211 215
212 } // namespace base 216 } // namespace base
213 } // namespace v8 217 } // namespace v8
OLDNEW
« no previous file with comments | « src/base/platform/platform-openbsd.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698