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

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: remove rogue printf Created 10 years 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
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/platform-linux.cc » ('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 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 // TODO(gc) this interface should be implemented for Windows platform as well.
331 static void* ReserveRegion(size_t size);
332
333 static bool CommitRegion(void* base, size_t size, bool is_executable);
334
335 static bool UncommitRegion(void* base, size_t size);
336
337 static bool ReleaseRegion(void* base, size_t size);
338
330 private: 339 private:
331 void* address_; // Start address of the virtual memory. 340 void* address_; // Start address of the virtual memory.
332 size_t size_; // Size of the virtual memory. 341 size_t size_; // Size of the virtual memory.
333 }; 342 };
334 343
335 344
336 // ---------------------------------------------------------------------------- 345 // ----------------------------------------------------------------------------
337 // ThreadHandle 346 // ThreadHandle
338 // 347 //
339 // A ThreadHandle represents a thread identifier for a thread. The ThreadHandle 348 // 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. 620 PlatformData* data_; // Platform specific data.
612 int samples_taken_; // Counts stack samples taken. 621 int samples_taken_; // Counts stack samples taken.
613 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); 622 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler);
614 }; 623 };
615 624
616 #endif // ENABLE_LOGGING_AND_PROFILING 625 #endif // ENABLE_LOGGING_AND_PROFILING
617 626
618 } } // namespace v8::internal 627 } } // namespace v8::internal
619 628
620 #endif // V8_PLATFORM_H_ 629 #endif // V8_PLATFORM_H_
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/platform-linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698