| Index: src/base/platform/platform.h
|
| diff --git a/src/base/platform/platform.h b/src/base/platform/platform.h
|
| index d3b6c9c1cf3d758276ccc39c50a20b51fc9f9f98..93d8d2cce2ab006150d286e2e406dd591adb2c1d 100644
|
| --- a/src/base/platform/platform.h
|
| +++ b/src/base/platform/platform.h
|
| @@ -295,8 +295,7 @@ class VirtualMemory {
|
| explicit VirtualMemory(size_t size);
|
|
|
| // Reserves virtual memory containing an area of the given size that
|
| - // is aligned per alignment. This may not be at the position returned
|
| - // by address().
|
| + // is aligned per alignment.
|
| VirtualMemory(size_t size, size_t alignment);
|
|
|
| // Construct a virtual memory by assigning it some already mapped address
|
| @@ -308,25 +307,20 @@ class VirtualMemory {
|
| ~VirtualMemory();
|
|
|
| // Returns whether the memory has been reserved.
|
| - bool IsReserved();
|
| + bool IsReserved() const;
|
|
|
| // Initialize or resets an embedded VirtualMemory object.
|
| void Reset();
|
|
|
| // Returns the start address of the reserved memory.
|
| - // If the memory was reserved with an alignment, this address is not
|
| - // necessarily aligned. The user might need to round it up to a multiple of
|
| - // the alignment to get the start of the aligned block.
|
| - void* address() {
|
| + void* address() const {
|
| DCHECK(IsReserved());
|
| return address_;
|
| }
|
|
|
| // Returns the size of the reserved memory. The returned value is only
|
| // meaningful when IsReserved() returns true.
|
| - // If the memory was reserved with an alignment, this size may be larger
|
| - // than the requested size.
|
| - size_t size() { return size_; }
|
| + size_t size() const { return size_; }
|
|
|
| // Commits real memory. Returns whether the operation succeeded.
|
| bool Commit(void* address, size_t size, bool is_executable);
|
|
|