-
Notifications
You must be signed in to change notification settings - Fork 39
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
custom copy methods #49
Comments
the memory stuff is weird because we have an SRAM that is not allocated from the heap. instead, the chip has a hard-coded address. there is a super-primitive system to allocate pointers to SRAM in avr32/src/memory.c , and no mechanism to free them. we could theoretically fix this by mapping the SRAM to heap in the memory map, but my abortive attempts at this were highly frustrating and wasted a lot of time. anyways, my approach is to basically think of all of these data structures as statically allocated. memcpy should be fine and appropriate, except evidently some pointers to heap-allocated structures are sneaking in somewhere. probably a fucking string or maybe a function pointer. probably specific to the single extant momome grid operator. |
still, might be safer to implement custom copy methods in the proper fashion. |
belatedly realizing that of course certain things in this system will break between builds if operator layouts, etc change drastically. obviously this is happening a lot right now. we could assume layouts will not change between major releases or something. i'm not really sure of the right way to handle version numbers but ship should be 0.x "beta" . can deal with compatibility when we want to break it ? |
iss 49: need deep-copy on ctlnet ? case: scene is written with older version of bees so, scene file needs to store bees version number. obvs, would be safest to have deep-copy methods for everything, q: can struct layout ever change between builds because of optimization level or other non-coding reason? it would be nice to enforce packed everywhere, but having trouble with this when nesting structs with gcc. |
using class-defined serialization methods, closing this and making #64 |
get your OOP act together and write custom copy methods for preset_t, scene_t, ctlnet_t, and whatever other big data classes are being blindly memcpy'd with impunity all over the dang place.
The text was updated successfully, but these errors were encountered: