def _get_memfee(self, address, size=<NUM_LIT:1>):
if not issymbolic(size) and size == <NUM_LIT:0>:<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT>address = self.safe_add(address, size)<EOL>allocated = self.allocated<EOL>GMEMORY = <NUM_LIT:3><EOL>GQUADRATICMEMDENOM = <NUM_LIT>  <EOL>old_size = Operators.ZEXTEND(Operators.UDIV(self.safe_add(allocated, <NUM_LIT>), <NUM_LIT:32>), <NUM_LIT>)<EOL>new_size = Operators.ZEXTEND(Operators.UDIV(self.safe_add(address, <NUM_LIT>), <NUM_LIT:32>), <NUM_LIT>)<EOL>old_totalfee = self.safe_mul(old_size, GMEMORY) + Operators.UDIV(self.safe_mul(old_size, old_size), GQUADRATICMEMDENOM)<EOL>new_totalfee = self.safe_mul(new_size, GMEMORY) + Operators.UDIV(self.safe_mul(new_size, new_size), GQUADRATICMEMDENOM)<EOL>memfee = new_totalfee - old_totalfee<EOL>flag = Operators.UGT(new_totalfee, old_totalfee)<EOL>return Operators.ITEBV(<NUM_LIT>, size == <NUM_LIT:0>, <NUM_LIT:0>, Operators.ITEBV(<NUM_LIT>, flag, memfee, <NUM_LIT:0>))<EOL>
This calculates the amount of extra gas needed for accessing to
previously unused memory.

:param address: base memory offset
:param size: size of the memory access