If m_data contains a relatively large amount of data, calls to readData are
really expensive as it copies the remaining data to the beginning of the buffer,around in memory.
For some reason, readAll() on an AccessManagerReply results in calls to
readData with a maxSize of 16384 until it returns 0. which can beThat's pretty much the
reallyworst case scenario, but also the most likely used one.
Avoid the expensive.ive remove operation by only calling remove if it saves
BUG: 375765sufficient memory.
Additionally, bail out if maxSize is < 0.