- if( ((unsigned)address >= (unsigned)str->address)
- && ((unsigned)address+size<=(unsigned)str->address+str->mapping_size)
- && (type & MEM_COMMIT))
- {
- close(fd);
- return address; //returning previously reserved memory
- }
- //printf(" VirtualAlloc(...) does not commit or not entirely within reserved, and\n");
- }
- /*printf(" VirtualAlloc(...) (0x%08X, %u) overlaps with (0x%08X, %u, state=%d)\n",
- (unsigned)address, size, (unsigned)str->address, str->mapping_size, str->state);*/
- close(fd);
- return NULL;
- }
+ if( ((unsigned)address >= (unsigned)str->address)
+ && ((unsigned)address+size<=(unsigned)str->address+str->mapping_size)
+ && (type & MEM_COMMIT))
+ {
+ close(fd);
+ return address; //returning previously reserved memory
+ }
+ //printf(" VirtualAlloc(...) does not commit or not entirely within reserved, and\n");
+ }
+ /*printf(" VirtualAlloc(...) (0x%08X, %u) overlaps with (0x%08X, %u, state=%d)\n",
+ (unsigned)address, size, (unsigned)str->address, str->mapping_size, str->state);*/
+ close(fd);
+ return NULL;
+ }