Comments (4)
Just FYI, this problem is reproduced by using precompile(test_precomp, (Int,))
directly without PrecompileTools
.
Also, for i in 1:N
is necessary to ensure that the allocation occurs with each call, but is not necessary to reproduce the problem itself.
from julia.
We now have PkgCacheInspector.jl. However, I could not find the cause.
Edit:
SnoopCompile.@snoopi_deep
also helps to understand what is happening.
from julia.
Despite the use of function pointers, this problem does not occur in the following simple case.
function test_precomp()
ptr = @cfunction(cos, Float64, (Float64,))
ccall(ptr, Float64, (Float64,), 0.0)
end
Edit:
So, the generated function do_call()
might be relevant.
https://github.com/yuyichao/FunctionWrappers.jl/blob/ad1cea6fd36a7e72c2755efacd4f28b52fbb1f6a/src/FunctionWrappers.jl#L125-L142
Edit2:
There is a change (PR yuyichao/FunctionWrappers.jl#31) in FunctionWrappers#master
, but at least this problem still occurs.
from julia.
In case it's a clue: I see allocations like this from FunctionWrappers used in precompiled code in a large codebase (the allocations go away if I don't precompile), but only on Apple Silicon (unlike the minimal case above). For some reason, the problem goes away on x86. Perhaps related to yuyichao/FunctionWrappers.jl#30?
from julia.
Related Issues (20)
- Test failure in `Sockets` with `IOError: listen: address already in use (EADDRINUSE)`
- Overrides.toml broken on master
- `GlobalRef`s as `Dict` keys in precompilation are invalid HOT 1
- `Array{T}(::T)` should return a zero-dimensional array HOT 7
- GC is too lazy, sometimes HOT 10
- External Pkg always recompiles upon loading HOT 12
- REPLExt for Pkg no longer loads when loading a custom Pkg HOT 2
- length() no longer works with Iterators.Stateful in Julia 1.11rc1 HOT 2
- uninitialized typed global can only be imported qualified and not directly HOT 4
- REPL tab completion for paths inside double quotes adds an extra double quote when expanding to a single match
- keymap error when pressing up arrow in REPL HOT 1
- [1.10] Possible thread safety issue in manipulation of doubly linked list of bigval_t? HOT 5
- 'make test' fails for julia-1.11.0-rc1 HOT 1
- Drop OBJPROFILE? HOT 3
- Typing Memory.body() crashes Julia. HOT 1
- Feature request: Finer-grained sleep function HOT 30
- FEATURE REQUEST: Julia REPL to show currently active environment in julia and shell mode HOT 1
- Distributed error with function kwargs HOT 1
- Produce coverage files that include info on non compiled functions
- `USE_BINARYBUILDER_LLVM=0` doesn't work on windows HOT 3
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 julia.