+static inline page_index_t
+generation_alloc_start_page(generation_index_t generation, int page_type_flag, int large)
+{
+ if (large) {
+ if (UNBOXED_PAGE_FLAG == page_type_flag) {
+ return generations[generation].alloc_large_unboxed_start_page;
+ } else if (BOXED_PAGE_FLAG == page_type_flag) {
+ return generations[generation].alloc_large_start_page;
+ } else {
+ lose("bad page type flag: %d", page_type_flag);
+ }
+ } else {
+ if (UNBOXED_PAGE_FLAG == page_type_flag) {
+ return generations[generation].alloc_unboxed_start_page;
+ } else if (BOXED_PAGE_FLAG == page_type_flag) {
+ return generations[generation].alloc_start_page;
+ } else {
+ lose("bad page_type_flag: %d", page_type_flag);
+ }
+ }
+}
+
+static inline void
+set_generation_alloc_start_page(generation_index_t generation, int page_type_flag, int large,
+ page_index_t page)
+{
+ if (large) {
+ if (UNBOXED_PAGE_FLAG == page_type_flag) {
+ generations[generation].alloc_large_unboxed_start_page = page;
+ } else if (BOXED_PAGE_FLAG == page_type_flag) {
+ generations[generation].alloc_large_start_page = page;
+ } else {
+ lose("bad page type flag: %d", page_type_flag);
+ }
+ } else {
+ if (UNBOXED_PAGE_FLAG == page_type_flag) {
+ generations[generation].alloc_unboxed_start_page = page;
+ } else if (BOXED_PAGE_FLAG == page_type_flag) {
+ generations[generation].alloc_start_page = page;
+ } else {
+ lose("bad page type flag: %d", page_type_flag);
+ }
+ }
+}
+