wrote O(size+N) getAddressOfUnsudedMemoryOfSizeN method