fortanix / rust-sgx

The Fortanix Rust Enclave Development Platform
https://edp.fortanix.com
Mozilla Public License 2.0
422 stars 99 forks source link

Added a stress test for memory allocation (snmalloc) #566

Closed NirjharRoyiitk closed 3 months ago

NirjharRoyiitk commented 4 months ago

This is a very basic stress test for memory allocator

Description of the test:

This thread creates 64 threads of 3 types:

  1. Large threads allocates buffers of size 1GB to 4GB and scans them page wise
  2. Medium threads allocates buffers of size 8MB to 128MB and scans them with an interval of 1MB
  3. Small threads allocates buffers of size 1KB to 512KB and scans them with an interval of 1KB

After scanning the buffers every thread frees the buffer. In the end it calculates the time taken to do all the operations (list from step 1 to step 3). The test periodically prints the average operation time of each thread