@@ -542,6 +542,7 @@ int toku_ft_loader_internal_init (/* out */ FTLOADER *blp,
...
@@ -542,6 +542,7 @@ int toku_ft_loader_internal_init (/* out */ FTLOADER *blp,
LSNload_lsn,
LSNload_lsn,
TOKUTXNtxn,
TOKUTXNtxn,
boolreserve_memory,
boolreserve_memory,
uint64_treserve_memory_size,
boolcompress_intermediates)
boolcompress_intermediates)
// Effect: Allocate and initialize a FTLOADER, but do not create the extractor thread.
// Effect: Allocate and initialize a FTLOADER, but do not create the extractor thread.
{
{
...
@@ -552,14 +553,16 @@ int toku_ft_loader_internal_init (/* out */ FTLOADER *blp,
...
@@ -552,14 +553,16 @@ int toku_ft_loader_internal_init (/* out */ FTLOADER *blp,
bl->cachetable=cachetable;
bl->cachetable=cachetable;
if(reserve_memory&&bl->cachetable){
if(reserve_memory&&bl->cachetable){
bl->did_reserve_memory=true;
bl->did_reserve_memory=true;
bl->reserved_memory=toku_cachetable_reserve_memory(bl->cachetable,2.0/3.0);// allocate 2/3 of the unreserved part (which is 3/4 of the memory to start with).
bl->reserved_memory=toku_cachetable_reserve_memory(bl->cachetable,2.0/3.0,reserve_memory_size);// allocate 2/3 of the unreserved part (which is 3/4 of the memory to start with).
}
}
else{
else{
bl->did_reserve_memory=false;
bl->did_reserve_memory=false;
bl->reserved_memory=512*1024*1024;// if no cache table use 512MB.
bl->reserved_memory=512*1024*1024;// if no cache table use 512MB.