@@ -8,8 +8,7 @@ use crate::{
88 LuaRawFunction , LuaRawTable , LuaResult , LuaValue ,
99 gc:: {
1010 GC , GcCClosure , GcFunction , GcObjectOwner , GcProto , GcRClosure , GcString , GcTable ,
11- GcThread , GcUpvalue , GcUserdata , PagedPool , Pooled , ProtoPtr , StringPtr , TableAllocHandle ,
12- UpvaluePtr ,
11+ GcThread , GcUpvalue , GcUserdata , PagedPool , Pooled , ProtoPtr , StringPtr , UpvaluePtr ,
1312 } ,
1413} ;
1514
@@ -26,7 +25,6 @@ pub struct ObjectAllocator {
2625 userdata_pool : PagedPool < GcUserdata > ,
2726 proto_pool : PagedPool < GcProto > ,
2827 call_info_pool : PagedPool < CallInfo > ,
29- table_allocator : TableAllocHandle ,
3028}
3129
3230impl Default for ObjectAllocator {
@@ -48,7 +46,6 @@ impl ObjectAllocator {
4846 userdata_pool : PagedPool :: new ( 16 ) ,
4947 proto_pool : PagedPool :: new ( 16 ) ,
5048 call_info_pool : PagedPool :: new ( 64 ) ,
51- table_allocator : TableAllocHandle :: default ( ) ,
5249 }
5350 }
5451
@@ -121,11 +118,7 @@ impl ObjectAllocator {
121118 } ;
122119 let size = ( base_size + array_bytes + hash_bytes) as u32 ;
123120 let ptr = self . table_pool . alloc ( GcTable :: new (
124- LuaRawTable :: new (
125- array_size as u32 ,
126- hash_size as u32 ,
127- self . table_allocator . clone ( ) ,
128- ) ,
121+ LuaRawTable :: new ( array_size as u32 , hash_size as u32 ) ,
129122 current_white,
130123 size,
131124 ) ) ;
@@ -280,7 +273,6 @@ impl ObjectAllocator {
280273 pub fn trim_after_full_gc ( & mut self ) {
281274 self . table_pool . release_empty_pages ( ) ;
282275 self . string_pool . release_empty_pages ( ) ;
283- self . table_allocator . clear_cached_blocks ( ) ;
284276 self . cclosure_pool . release_empty_pages ( ) ;
285277 self . rclosure_pool . release_empty_pages ( ) ;
286278 self . upvalue_pool . release_empty_pages ( ) ;
0 commit comments