]> Cypherpunks repositories - gostls13.git/commit
runtime: add page cache and tests
authorMichael Anthony Knyszek <mknyszek@google.com>
Wed, 18 Sep 2019 17:51:16 +0000 (17:51 +0000)
committerMichael Knyszek <mknyszek@google.com>
Fri, 8 Nov 2019 18:00:45 +0000 (18:00 +0000)
commit81640ea38dc6577bdf1b206b778b968d341c27eb
tree529fd2da22bb25e38bdd4e1d7e81f6e7e84d0498
parentc444ec308506463bd4ab3226c6aab55746347780
runtime: add page cache and tests

This change adds a page cache structure which owns a chunk of free pages
at a given base address. It also adds code to allocate to this cache
from the page allocator. Finally, it adds tests for both.

Notably this change does not yet integrate the code into the runtime,
just into runtime tests.

Updates #35112.

Change-Id: Ibe121498d5c3be40390fab58a3816295601670df
Reviewed-on: https://go-review.googlesource.com/c/go/+/196643
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/export_test.go
src/runtime/mpagecache.go [new file with mode: 0644]
src/runtime/mpagecache_test.go [new file with mode: 0644]
src/runtime/mpallocbits.go