This commit is contained in:
twinaphex 2020-10-06 14:14:09 +02:00
parent 32fa82bff2
commit 3a97f6db79

View File

@ -111,12 +111,6 @@ INLINE void MemoryStream::grow_if_necessary(uint64 new_required_size)
if(new_required_alloced < new_required_size || new_required_alloced > SIZE_MAX)
new_required_alloced = SIZE_MAX;
#if 0
// If constrained alloc size isn't enough, throw an out-of-memory/address-space type error.
if(new_required_alloced < new_required_size)
throw MDFN_Error(ErrnoHolder(ENOMEM));
#endif
new_data_buffer = (uint8*)realloc(data_buffer, new_required_alloced);
//
@ -153,11 +147,6 @@ void MemoryStream::write(const void *data, uint64 count)
{
uint64 nrs = position + count;
#if 0
if(nrs < position)
throw MDFN_Error(ErrnoHolder(EFBIG));
#endif
grow_if_necessary(nrs);
memmove(&data_buffer[position], data, count);