using boolean ramBufferSizeSet instead of reading property every time