Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lower memory consumption #45

Closed
wants to merge 4 commits into from
Closed

Lower memory consumption #45

wants to merge 4 commits into from

Conversation

JayFoxRox
Copy link
Owner

TODO:

  • Fix bugs
  • PR desc

alloc.h Show resolved Hide resolved
@JayFoxRox
Copy link
Owner Author

JayFoxRox commented Jun 6, 2019

I had this happen:

p 0x16FEF000
Stack at 0xC07FF43C; returning EAX: 0x00000000
 860883 Emulation at 48A98B ('IDirectDrawSurface4__2') from 48A98B

hHeap 0x555
dwFlags 0x0
lpMem 0x16FC6000
Stack at 0xC07FF5D8; returning EAX: 0x00000001
 860884 Emulation at 49F265 ('�쩺U') from 49F265

hObject 0xCF5
Stack at 0xC07FF5DC; returning EAX: 0x00000001
 860885 Emulation at 4A0498 ('') from 4A0498

p 0x16FF7000
Stack at 0xC07FF76C; returning EAX: 0x00000000
 860886 Emulation at 48AA52 ('IDirect3DTexture2__2') from 48AA52

with ./openswe1r-vm on 9104062

Edit: Was probably caused by lack of strdup in label = strdup(importByName->name);. Fixed in master.

alloc.c Outdated Show resolved Hide resolved
alloc.c Outdated
// Allocate flags which tell us wether a block is used
size_t used_flag_size = (block_count + 7) / 8;
block_usage = malloc(used_flag_size);
memset(block_usage, 0x00, used_flag_size);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allow to dynamically grow the number of blocks

main.c Outdated Show resolved Hide resolved
emulation.c Outdated Show resolved Hide resolved
@JayFoxRox JayFoxRox force-pushed the less-mem branch 2 times, most recently from d1becd2 to eba3d83 Compare June 12, 2019 15:04
@JayFoxRox
Copy link
Owner Author

Upstreamed

@JayFoxRox JayFoxRox closed this Jun 12, 2019
@JayFoxRox JayFoxRox deleted the less-mem branch January 4, 2020 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant