Comments (4)
Hi @tillknuesting - at the time, the plan was for TinyGo to stop exporting those in 0.28.0 so did not export them here either. But it looks like that didn't happen yet, let me confirm if this is a long-term decision to keep the exports, and if so we'll add them.
tinygo-org/tinygo#3142 (comment)
In the meantime, you can define your own functions if needed
import "C"
//export allocate
func allocate(size uint32) unsafe.Pointer {
// IIRC, the type actually is unsigned long in wasi-libc source for some reason, or otherwise whatever C. cast works :)
return C.malloc(C.ulong(size))
}
//export deallocate
func deallocate(ptr unsafe.Pointer) {
C.free(ptr)
}
from nottinygc.
@tillknuesting Thanks for bringing this up, I have made the change to export malloc/free by default. Will try to cut a release soon after debugging #13 further
from nottinygc.
Can we export this
Line 53 in 59403c7
from nottinygc.
Oh, I found this even simpler workaround
tetratelabs/wazero#1429 (comment)
I think we'll probably end up exporting by default here to match 0.28 but let me hear a bit on what the plan on TinyGo is first.
from nottinygc.
Related Issues (14)
- Failed to load Wasm module in Istio HOT 2
- browser support? HOT 22
- nottinygc memory leak with fastcache HOT 2
- invalid flag: --export=malloc HOT 2
- --export=malloc --export=free cause memory leak HOT 3
- Getting integer divide by zero error HOT 2
- Question: Does the gc execute before the `proxywasm.DispatchHttpCall` callback executes ? HOT 20
- Memory leak exists, should use GC_malloc_ignore_off_page when alloc large object. HOT 18
- Getting integer divide by zero error when use compress/gzip HOT 3
- error: Linking globals named 'runtime.SetFinalizer': symbol multiply defined! HOT 5
- There may be a memory leak when processing memory blocks containing non-ASCII characters. HOT 4
- Wasm VM failed Failed to initialize Wasm code HOT 3
- can nottinygc support wasm? HOT 1
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 nottinygc.