Skip to content

Commit

Permalink
mmap-alloc: Improve tests for permissions, fix realloc bugs
Browse files Browse the repository at this point in the history
- Add the ability to parse /proc/<pid>/maps on Linux, and
  incorporate this into existing tests in order to verify
  permissions
- Remove checks for allocation at the 0 page, as it turns
  out that these are unnecessary on all platforms that we
  support (Linux, Mac, Windows)
- Change the way boolean configuration functions work for
  MapAllocBuilder (instead of xxx() and no_xxx(), we now
  supply a single xxx(xxx: bool) method that accepts a
  boolean indicating whether the configuration should be
  on or off)
- Move tests module into separate file

Closes #80, #83
Closes #72 by making it unnecessary since this commit removes
the use case for mark_unused
  • Loading branch information
joshlf committed Sep 22, 2017
1 parent d2613a4 commit bcd420c
Show file tree
Hide file tree
Showing 3 changed files with 797 additions and 579 deletions.
15 changes: 13 additions & 2 deletions mmap-alloc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,22 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Added `commit` and `uncommit` methods on Windows
- Added the ability to configure whether `alloc` commits memory
- Added documentation about instruction cache incoherency
- Added support for full Alloc API (`shrink_in_place`, `grow_in_place`, `realloc`)
- In Linux, these functions can use `mremap` to grow/shrink beyond the size of a the pagesize
- Added support for full Alloc API (`shrink_in_place`, `grow_in_place`,
`realloc`)
- In Linux, these functions can use `mremap` to grow/shrink beyond the size
of a the pagesize
- Added tests for memory permissions on Linux by parsing `/proc/<pid>/maps`

### Removed
- Removed `commit` method on on Linux and Mac
- Removed tests for `mmap`s at NULL on Linux and Mac, as it turns out they are
guaranteed not to happen

### Changed
- Changed the way boolean configuration methods on `MapAllocBuilder` work
(previously, for each configuration option, there was a pair of methods to
enable and disable that option; now, there's a single method that accepts a
boolean indicating whether the option should be enabled)

### Fixed
- Fixed a bug that prevented compilation on 32-bit Windows
Expand Down
Loading

0 comments on commit bcd420c

Please sign in to comment.