Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(194)

Issue 115280044: Implemented the ZebraHeap (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 9 months ago by peterssen
Modified:
9 years, 9 months ago
CC:
sawbuck-changes_googlegroups.com
Base URL:
http://sawbuck.googlecode.com/svn/trunk
Visibility:
Public.

Description

Implemented the ZebraHeap A zebra-stripe heap allocates a (maximum) predefined amount of memory and serves allocation requests with size less or equal to the system page size. It divides the memory pages into "even" and "odd" types (like zebra-stripes). all the allocations are done in the even pages, just before the "odd" pages. The "odd" pages can be protected againt read/write which gives a basic mechanism for detecting buffer overflows. BUG= R=chrisha@chromium.org, sebmarchand@chromium.org Committed: https://code.google.com/p/sawbuck/source/detail?r=2206

Patch Set 1 : ZebraHeap cleanup #

Patch Set 2 : Edited misleading comment #

Patch Set 3 : Fixed some typos #

Total comments: 82

Patch Set 4 : Major cleanup, renamed to ZebraBlockHeap #

Patch Set 5 : Typos #

Total comments: 28

Patch Set 6 : Cleanup and two more tests added #

Total comments: 24

Patch Set 7 : More cleanup and one test improved #

Total comments: 27

Patch Set 8 : Minor fixes #

Total comments: 8

Patch Set 9 : More fixes (check test AllocateBlockCornerCases) #

Patch Set 10 : Augmented test AllocateBlockCornerCases #

Total comments: 3

Patch Set 11 : Fixed typo and removed unused #include #

Patch Set 12 : Some formatting and removed duplicate values in AllocateBlockCornerCases #

Patch Set 13 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+642 lines, -0 lines) Patch
M syzygy/agent/asan/asan.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -0 lines 0 comments Download
A syzygy/agent/asan/heaps/zebra_block_heap.h View 1 2 3 4 5 6 7 8 1 chunk +115 lines, -0 lines 0 comments Download
A syzygy/agent/asan/heaps/zebra_block_heap.cc View 1 2 3 4 5 6 7 8 1 chunk +173 lines, -0 lines 0 comments Download
A syzygy/agent/asan/heaps/zebra_block_heap_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +351 lines, -0 lines 0 comments Download

Messages

Total messages: 20
peterssen
PTAL.
9 years, 9 months ago (2014-07-28 17:04:38 UTC) #1
Sébastien Marchand
Nice start, a first round of comments mostly about the style. I haven't reviewed the ...
9 years, 9 months ago (2014-07-28 17:40:48 UTC) #2
chrisha
Looking pretty good for a first pass! https://codereview.appspot.com/115280044/diff/70001/syzygy/agent/asan/heaps/zebra_heap.cc File syzygy/agent/asan/heaps/zebra_heap.cc (right): https://codereview.appspot.com/115280044/diff/70001/syzygy/agent/asan/heaps/zebra_heap.cc#newcode21 syzygy/agent/asan/heaps/zebra_heap.cc:21: ZebraHeap::ZebraHeap() : ...
9 years, 9 months ago (2014-07-28 17:45:19 UTC) #3
peterssen
PTAL. I renamed the files, the comments were lost, but I fixed everything. https://codereview.appspot.com/115280044/diff/70001/syzygy/agent/asan/heaps/zebra_heap.cc File ...
9 years, 9 months ago (2014-07-29 14:17:35 UTC) #4
chrisha
Looking good! A handful more comments. https://codereview.appspot.com/115280044/diff/160001/syzygy/agent/asan/heaps/zebra_block_heap.cc File syzygy/agent/asan/heaps/zebra_block_heap.cc (right): https://codereview.appspot.com/115280044/diff/160001/syzygy/agent/asan/heaps/zebra_block_heap.cc#newcode30 syzygy/agent/asan/heaps/zebra_block_heap.cc:30: VirtualAlloc(NULL, heap_size_, Please ...
9 years, 9 months ago (2014-07-29 17:26:12 UTC) #5
peterssen
PTAL. All previous issues fixed and two more tests added. https://codereview.appspot.com/115280044/diff/160001/syzygy/agent/asan/heaps/zebra_block_heap.cc File syzygy/agent/asan/heaps/zebra_block_heap.cc (right): https://codereview.appspot.com/115280044/diff/160001/syzygy/agent/asan/heaps/zebra_block_heap.cc#newcode30 ...
9 years, 9 months ago (2014-07-29 18:44:43 UTC) #6
chrisha
More comments... getting there! https://codereview.appspot.com/115280044/diff/200001/syzygy/agent/asan/heaps/zebra_block_heap.cc File syzygy/agent/asan/heaps/zebra_block_heap.cc (right): https://codereview.appspot.com/115280044/diff/200001/syzygy/agent/asan/heaps/zebra_block_heap.cc#newcode56 syzygy/agent/asan/heaps/zebra_block_heap.cc:56: if (::VirtualFree(heap_address_, 0, MEM_RELEASE) == ...
9 years, 9 months ago (2014-07-29 20:07:52 UTC) #7
peterssen
PTAL. All issues fixed, improved tests. https://codereview.appspot.com/115280044/diff/200001/syzygy/agent/asan/heaps/zebra_block_heap.cc File syzygy/agent/asan/heaps/zebra_block_heap.cc (right): https://codereview.appspot.com/115280044/diff/200001/syzygy/agent/asan/heaps/zebra_block_heap.cc#newcode56 syzygy/agent/asan/heaps/zebra_block_heap.cc:56: if (::VirtualFree(heap_address_, 0, ...
9 years, 9 months ago (2014-07-29 22:01:51 UTC) #8
Sébastien Marchand
A few more comments. Don't worry about the number of comments, it's your first CL ...
9 years, 9 months ago (2014-07-29 22:23:43 UTC) #9
chrisha
https://codereview.appspot.com/115280044/diff/240001/syzygy/agent/asan/heaps/zebra_block_heap.cc File syzygy/agent/asan/heaps/zebra_block_heap.cc (right): https://codereview.appspot.com/115280044/diff/240001/syzygy/agent/asan/heaps/zebra_block_heap.cc#newcode56 syzygy/agent/asan/heaps/zebra_block_heap.cc:56: CHECK_NE(FALSE, ::VirtualFree(heap_address_, 0, MEM_RELEASE)); On 2014/07/29 22:23:42, Sébastien Marchand ...
9 years, 9 months ago (2014-07-29 22:49:09 UTC) #10
Sébastien Marchand
https://codereview.appspot.com/115280044/diff/240001/syzygy/agent/asan/heaps/zebra_block_heap.cc File syzygy/agent/asan/heaps/zebra_block_heap.cc (right): https://codereview.appspot.com/115280044/diff/240001/syzygy/agent/asan/heaps/zebra_block_heap.cc#newcode56 syzygy/agent/asan/heaps/zebra_block_heap.cc:56: CHECK_NE(FALSE, ::VirtualFree(heap_address_, 0, MEM_RELEASE)); On 2014/07/29 22:49:09, chrisha wrote: ...
9 years, 9 months ago (2014-07-30 14:12:10 UTC) #11
peterssen
PTAL. Small fixes. https://codereview.appspot.com/115280044/diff/240001/syzygy/agent/asan/heaps/zebra_block_heap.cc File syzygy/agent/asan/heaps/zebra_block_heap.cc (right): https://codereview.appspot.com/115280044/diff/240001/syzygy/agent/asan/heaps/zebra_block_heap.cc#newcode56 syzygy/agent/asan/heaps/zebra_block_heap.cc:56: CHECK_NE(FALSE, ::VirtualFree(heap_address_, 0, MEM_RELEASE)); I'll use ...
9 years, 9 months ago (2014-07-30 14:30:43 UTC) #12
Sébastien Marchand
Almost done ! A few more comments, Chris can you take a look at my ...
9 years, 9 months ago (2014-07-30 15:43:24 UTC) #13
peterssen
PTAL. @Chis: About the AllocateBlockCornerCases test. I don't have any guarantees on the layout (PlanBlockLayout ...
9 years, 9 months ago (2014-07-30 16:26:16 UTC) #14
chrisha
https://codereview.appspot.com/115280044/diff/260001/syzygy/agent/asan/heaps/zebra_block_heap_unittest.cc File syzygy/agent/asan/heaps/zebra_block_heap_unittest.cc (right): https://codereview.appspot.com/115280044/diff/260001/syzygy/agent/asan/heaps/zebra_block_heap_unittest.cc#newcode282 syzygy/agent/asan/heaps/zebra_block_heap_unittest.cc:282: const size_t kSizes[] = {0, 1, 3, 7, 9, ...
9 years, 9 months ago (2014-07-30 16:40:03 UTC) #15
peterssen
On 2014/07/30 16:40:03, chrisha wrote: > https://codereview.appspot.com/115280044/diff/260001/syzygy/agent/asan/heaps/zebra_block_heap_unittest.cc > File syzygy/agent/asan/heaps/zebra_block_heap_unittest.cc (right): > > https://codereview.appspot.com/115280044/diff/260001/syzygy/agent/asan/heaps/zebra_block_heap_unittest.cc#newcode282 > ...
9 years, 9 months ago (2014-07-30 18:53:26 UTC) #16
chrisha
Okay, that seems like a reasonable compromise for the unittest. I'm happy with this as ...
9 years, 9 months ago (2014-07-30 19:25:36 UTC) #17
Sébastien Marchand
lgtm. https://codereview.appspot.com/115280044/diff/320001/syzygy/agent/asan/heaps/zebra_block_heap_unittest.cc File syzygy/agent/asan/heaps/zebra_block_heap_unittest.cc (right): https://codereview.appspot.com/115280044/diff/320001/syzygy/agent/asan/heaps/zebra_block_heap_unittest.cc#newcode285 syzygy/agent/asan/heaps/zebra_block_heap_unittest.cc:285: const size_t kSizes[] = {0, 1, 2, 3, ...
9 years, 9 months ago (2014-07-30 19:33:48 UTC) #18
peterssen
On 2014/07/30 19:25:36, chrisha wrote: > Okay, that seems like a reasonable compromise for the ...
9 years, 9 months ago (2014-07-30 19:35:15 UTC) #19
peterssen
9 years, 9 months ago (2014-07-30 20:19:28 UTC) #20
Message was sent while issue was closed.
Committed patchset #13 manually as r2206 (presubmit successful).
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b