Comments (2)
Hi @bawilless, thank you for the feedback!
RE: warnings logs, your assumption is correct: by design, the GNU function wrapping applies to the user code and linked static libraries, it cannot apply within libraries that are embedded in the OS image or not linked to your App's executable.
Because from within the free()
function itself the caller cannot be determined, unfortunately the wrapped-free-function can't intercept i.e. OS calls and ignore them. That is the reason for that log and the existence of the special _free()
function.
Although, if the caller of the native free()
is actually freeing memory that was not allocated by your App, that warning can be ignored and just seen as a heads-up; instead, in case your App did own that pointer being logged, then that would be something you want to make sure to account, as that amount of memory being freed will not be tracked in the global heap_allocated
variable.
My suggestion is that once you have insured that your App is fully using the _free()
wrapper, you could eventually just comment out that log. One useful thing that log does tell though, is exactly what lead you to your assumption (i.e. the calls from outside your code), which in a debugging phase may be useful information (i.e. wither a pointer is being freed for you already by external libraries).
We'll consider this valuable feedback in improving the library. Stay tuned! ;)
from azure-sphere-gallery.
Closing this as feedback is taken.
One more thing, starting from OS 21.07, heap memory tracking now detail separately the heap used by shared libraries:
from azure-sphere-gallery.
Related Issues (12)
- Migrate cargo-azsphere to use serde when parsing
- Enable CI for Rust code
- Cargo-azsphere is calling `name.to_string` every time which is an unnecessary allocation. It's preferable to call `unwrap_or_else`.
- Simplify code in "cargo azsphere package"
- Always comment on every `unsafe` usage describing why the `unsafe` usage is sound HOT 1
- Reduce the scope of the unsafe block in get_certificate_identifier_at()
- Date not set HOT 2
- Azure Sphere MQTT multiple device issue HOT 1
- This repo is missing important files
- Definition of device modbus registers HOT 1
- This repo is missing a license file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-sphere-gallery.