Open StefanKarpinski opened 10 years ago
Commit f910cd04c96b55b702c474811809e03d613f8235 introduces some discussion on tracking memory allocation. It already existed as part of the profiling discussion in the stdlib section, but now is in the manual.
[questions deleted, not important anymore, just wanted to make sure before I made a PR.]
Do we want to document this (implying it's somthing you need to/should know about..?)?
http://julia.readthedocs.org/en/latest/stdlib/libc/
Or even fix such with Compat.jl
https://github.com/JuliaLang/Compat.jl#other-changes https://github.com/JuliaLang/Compat.jl/blob/master/src/Compat.jl#L478
Please at least do some basic search, especially since you already mentioned the document and Compat.jl
Yes, know about Libc documentation, it seems to say, just calls C. Sorry about Compat.jl, should have just checked. The question about Libc.* wasn't if it was documented, but if it was good enough. Should maybe have some warning or explain differences. I do not want to assume, if it doesn't say. I could document it, just want to be sure first.
AFAIK, Libc.*
are just wrappers around the ccall to the libc functions. They have pretty much nothing to do with the GC and generic julia object. Just use them when you need to call the corresponding C functions. I'm not sure what is the part you are confused about but feel free to submit doc PR.
Ok, thanks. So you can use Julia "as C without a GC" (and I assume it will stay that way forever). From scanning the Embedding docs (a while back), it seemed Julia does more.
Looking up Libc also show "Python function", "Python data", "Python module". Is that an error? Looking those up, is not helpful.. I assume it means something in relation to PyCall.. This could just be confusing to someone, if you had never heard of the Python language.
Ok, thanks. So you can use Julia "as C without a GC" (and I assume it will stay that way forever). From scanning the Embedding docs (a while back), it seemed Julia does more.
I suppose you mean "with a GC"? Just to be clear, julia GC doesn't really use malloc
/free
to manage memory.
Looking up Libc also show "Python function", "Python data", "Python module". Is that an error? Looking those up, is not helpful.. I assume it means something in relation to PyCall.. This could just be confusing to someone, if you had never heard of the Python language.
See https://github.com/rtfd/readthedocs.org/issues/1382 . Oh, well, I'm not sure what we can do about it ....
@PallHaraldsson: thanks for the interest, but these questions are not well-suited for the GitHub tracker. Please use the mailing list or StackOverflow, where answers are archived and searchable.
(the Python function
thing has an existing doc issue open)
I added #13517 from this understanding above. Not sure how I connect to this, or if I should. And I really meant "as C without a GC", that is is manual memory management also an option (even with GC, partly)., could be useful possibly for games/real-time use..
Might still be good to have a non-expert section on memory management in the main manual. This discourse post might serve as a good starting point for such a section:
https://discourse.julialang.org/t/details-about-julias-garbage-collector-reference-counting/18021/3
cc @chflood
As pointed out on julia-users, we don't really talk about memory management in our documentation at all. There should probably be a chapter in the manual talking about it.