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

Side by Side Diff: src/platform.h

Issue 5987005: Refactor MemoryAllocator to allow big normal pages (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 12 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 320
321 // Returns the size of the reserved memory. 321 // Returns the size of the reserved memory.
322 size_t size() { return size_; } 322 size_t size() { return size_; }
323 323
324 // Commits real memory. Returns whether the operation succeeded. 324 // Commits real memory. Returns whether the operation succeeded.
325 bool Commit(void* address, size_t size, bool is_executable); 325 bool Commit(void* address, size_t size, bool is_executable);
326 326
327 // Uncommit real memory. Returns whether the operation succeeded. 327 // Uncommit real memory. Returns whether the operation succeeded.
328 bool Uncommit(void* address, size_t size); 328 bool Uncommit(void* address, size_t size);
329 329
330 static void* ReserveRegion(size_t size);
331
332 static bool CommitRegion(void* base, size_t size, bool is_executable);
333
334 static bool UncommitRegion(void* base, size_t size);
335
336 static bool ReleaseRegion(void* base, size_t size);
337
330 private: 338 private:
331 void* address_; // Start address of the virtual memory. 339 void* address_; // Start address of the virtual memory.
332 size_t size_; // Size of the virtual memory. 340 size_t size_; // Size of the virtual memory.
333 }; 341 };
334 342
335 343
336 // ---------------------------------------------------------------------------- 344 // ----------------------------------------------------------------------------
337 // ThreadHandle 345 // ThreadHandle
338 // 346 //
339 // A ThreadHandle represents a thread identifier for a thread. The ThreadHandle 347 // A ThreadHandle represents a thread identifier for a thread. The ThreadHandle
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 PlatformData* data_; // Platform specific data. 619 PlatformData* data_; // Platform specific data.
612 int samples_taken_; // Counts stack samples taken. 620 int samples_taken_; // Counts stack samples taken.
613 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); 621 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler);
614 }; 622 };
615 623
616 #endif // ENABLE_LOGGING_AND_PROFILING 624 #endif // ENABLE_LOGGING_AND_PROFILING
617 625
618 } } // namespace v8::internal 626 } } // namespace v8::internal
619 627
620 #endif // V8_PLATFORM_H_ 628 #endif // V8_PLATFORM_H_
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/platform-linux.cc » ('j') | src/spaces.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698