Skip to content

Conversation

dkimitsa
Copy link
Contributor

@dkimitsa dkimitsa commented Apr 6, 2022

Changes

  1. attribute/class info structs: these are now generated to be not packed (will consume a bit more ram)
  2. VM code updated to new structure layouts
  3. Debugger code updated to new structure layouts

Memory footprint affected

as information structures are not packed it will increase memory requirement to keep these.
On sample project it increases size of structs from 5525197 to 6935824 bytes or by 25%

removed linker flags

  • -w that was suppressing all warnings
  • -no_pie -- as it is not supported for arm targets (and debugger can handle it)
  • -sdk_version as linker picks one from platform_version

1. attribute/class info structs: these are now generated to be not packed (will consume a bit more ram)
2. VM code updated to new structure layouts
3. Debugger code updated to new structure layouts
@dkimitsa
Copy link
Contributor Author

dkimitsa commented Apr 6, 2022

also for 2.3.17

@Tom-Ski Tom-Ski added this to the 2.3.17 milestone Apr 6, 2022
Tom-Ski and others added 2 commits April 7, 2022 14:42
- `-w` that was suppressing all warnings
- `-no_pie` -- as it is not supported for arm targets (and debugger can handle it)
- `-sdk_version` as linker picks one from `platform_version`
@dkimitsa dkimitsa marked this pull request as ready for review April 8, 2022 08:49
@dkimitsa
Copy link
Contributor Author

dkimitsa commented Apr 8, 2022

@Tom-Ski Tom-Ski merged commit ada357a into MobiVM:master Apr 24, 2022
@dkimitsa dkimitsa deleted the fix/123-unalligned-pointers branch April 26, 2022 10:22
@bartekpacia
Copy link

@dkimitsa Thank you for fixing this!

dkimitsa added a commit to dkimitsa/robovm that referenced this pull request Aug 5, 2022
introduced by MobiVM#639
root case: struct member alignment was wrongly calculated for jlong and double: was calculated as aligned by member size (8 bytes) but has to be 4 byte boundary.
fix: use `offsetof` to get data layout offsets
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.

3 participants