blockSize(matrixSize, rectangularBlocks = TRUE, maxMemoryAllocation = NULL, overheadFactor = 3)
blockSize
times matrixSize
) or square (of size blockSize
times blockSize
).matrixSize
if the entire calculation is
expected to fit into memory in one piece.If the entire expected result fits
into the allowed memory (after taking into account the expected overhead), the returned block size will
equal the input matrixSize
.
The internal estimation of available memory works by returning the size of largest successfully allocated block of memory. It is hoped that this will lead to reasonable results but some operating systems may actually allocate more than is available. It is therefore preferable that the user specifies the available memory by hand.
# Suitable blocks for handling 30,000 genes within 2GB (=2^31 bytes) of memory
blockSize(30000, rectangularBlocks = TRUE, maxMemoryAllocation = 2^31)
Run the code above in your browser using DataLab