Memory usage during encryption

Examples of observed memory usage for common operations of a wrapped app.

Observed examples of memory usage

Note: Use these examples as guidelines only.
Table 1. Read operation (decryption) memory usage observations
APIs used App memory usage without wrapper Total memory usage with wrapper

NSData - initWithContentsOfFile:

NSData + dataWithContentsOfFile:

NSData + dataWithContentsOfURL:

100 MB approximately 100 MB

NSData - initWithContentsOfFile:

NSData + dataWithContentsOfFile:

NSData + dataWithContentsOfURL:

10 MB approximately 10 MB

NSData - initWithContentsOfFile:options:error:

NSFileHAndle - readDataOfLength:

NSInputStream - read:maxLength:

100 MB 200 MB

NSData - initWithContentsOfFile:options:error:

NSFileHAndle - readDataOfLength:

NSInputStream - read:maxLength:

10 MB 20 MB
 

MaaS360AppWrapUtility CGPDFDocumentCreateWithURL:theURL

16 KB chunk size Double the chunk size or 32 KB
 

AVPlayer - initWithPlayerItem:

256 KB chunk size Double the chunk size or 512 KB
Note: Chunk sizes, including how much they accumulate in memory and their release rate, depend on the native API.
Table 2. Write operation (encryption) memory usage observations
APIs used App memory usage without wrapper Total memory usage with wrapper
Any 100 MB 200 MB
Any 10 MB 20 MB
Note: The memory that is used by the MaaS360® app wrapper is transient and released after the read or write operation completes and is returned back to the caller.