How much memory should I be able to use on a 32Bit process with mimalloc?
Given the simple example:
struct SingleMByte{
uint8_t bytes[ 1024 * 1024 ];
};
std::vector< std::unique_ptr< SingleMByte > > allTheMBytes;
while( 1 )
{
std::this_thread::sleep_for( std::chrono::milliseconds{ 25 } );
for( auto step = 0; step < 10; ++step )
allTheMBytes.push_back( std::make_unique< SingleMByte >() );
std::cout << allTheMBytes.size() << " MBytes allocated" << std::endl;
}
| System |
Allocator |
Usable memory [MBytes] |
| Windows 32Bit |
default |
1890 |
| Windows 32Bit |
mimalloc 2.1.9 |
1490 |
| wasm32 emsdk 4.0.0 |
default |
4090 |
| wasm32 emsdk 4.0.0 |
mimalloc 2.1.7 |
2920 |
Is this expected?
Is there a way to improve on that?
If I check the process with System Informer on Windows when it runs out of memory I see this:
Details


How can the difference between the commit and the work set size be explained?
This issue is a result of this discussion: emscripten-core/emscripten#20936 (comment)
How much memory should I be able to use on a 32Bit process with mimalloc?
Given the simple example:
Is this expected?
Is there a way to improve on that?
If I check the process with System Informer on Windows when it runs out of memory I see this:
Details
This issue is a result of this discussion: emscripten-core/emscripten#20936 (comment)