Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 214 void recommitSystemPages(void* addr, size_t len) | 214 void recommitSystemPages(void* addr, size_t len) |
| 215 { | 215 { |
| 216 ASSERT(!(len & kSystemPageOffsetMask)); | 216 ASSERT(!(len & kSystemPageOffsetMask)); |
| 217 #if OS(POSIX) | 217 #if OS(POSIX) |
| 218 (void) addr; | 218 (void) addr; |
| 219 #else | 219 #else |
| 220 RELEASE_ASSERT(setSystemPagesAccessible(addr, len)); | 220 RELEASE_ASSERT(setSystemPagesAccessible(addr, len)); |
| 221 #endif | 221 #endif |
| 222 } | 222 } |
| 223 | 223 |
| 224 void discardSystemPages(void* addr, size_t len) | |
| 225 { | |
|
haraken
2015/06/18 18:15:39
Shall we add ASSERT(!(len & kSystemPageOffsetMask)
| |
| 226 #if OS(POSIX) | |
| 227 decommitSystemPages(addr, len); | |
| 228 #else | |
| 229 (void) addr; | |
| 230 (void) len; | |
| 231 // TODO(cevans): implement this using MEM_RESET for Windows, once we've | |
| 232 // decided that the semantics are a match. | |
| 233 #endif | |
| 234 } | |
| 235 | |
| 224 } // namespace WTF | 236 } // namespace WTF |
| 225 | 237 |
| OLD | NEW |