[go-nuts] Re: It's possible to replace cgo memory allocator?
Sorry for the late reply. The problem was solved, thanks to everyone for the help. Just to give a little more context. The lib that I'm using is MuPDF and I thought that I had a memory leak but in the end, it was just glibc not releasing the memory fast enough to the OS. I solved the problem by changing the allocator at MuPDF to jemalloc. At my first analysis, I did not know where was the problem because the code looked correct, as it was, but I started to think that maybe I was leaking the memory in C from the Go code calling things like C.CString. Then I thought how can I allocate in C from Go utility functions like C.CString using an allocator that has leak detection called memento that the MuPDF team built? Well, I still don't know. I did it once using unsafe, but not by using the actual C.CString call. And regards LD_PRELOAD I did not found a way of making everything work together, I don't have much experience with C. Em sábado, 12 de junho de 2021 às 10:40:22 UTC+1, Tamás Gulácsi escreveu: > You can use the LD_PRELOAD env var ( > https://www.ibm.com/docs/en/spectrum-symphony/7.2.1?topic=optimization-optimizing-memory-consumption-tcmalloc-jemalloc) > > to use > jemalloc or tcmalloc, and debug with them. > > di3go.b...@gmail.com a következőt írta (2021. június 10., csütörtök, > 21:19:15 UTC+2): > >> I'm using cgo and struggling to find a memory leak which can be easily >> detected if I can replace the cgo memory allocator to the one the C library >> I'm using have because they did a leak detector implementation there. >> >> It's possible? >> >> >> -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/b0c67495-e456-462c-817d-9f5500714b0fn%40googlegroups.com.
[go-nuts] It's possible to replace cgo memory allocator?
I'm using cgo and struggling to find a memory leak which can be easily detected if I can replace the cgo memory allocator to the one the C library I'm using have because they did a leak detector implementation there. It's possible? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/90a90c8a-fe37-486f-89fa-7f39da02562cn%40googlegroups.com.
Re: [go-nuts] [ANN] PipeHub: A programmable proxy server
Hi Marko, Glad that you liked. I'll be posting on this topic new releases of the project. Also gonna take a look at the proxy you linked. Em sábado, 23 de março de 2019 19:07:38 UTC, Marko Ristin escreveu: > > Hi Diego, > Thanks for sharing, looks very interesting! Please keep us posted and let > us know when it's production-ready. > > We also implemented a simple reverse proxy at the company since we wanted > it to be easy to automatically set up and configure. This helped us to add > a simple reverse proxy to microservices running on each instance (and we > have a lot of instance that are deployed automatically). Beforehand we > tried with nginx and maintaining many custom deployments turned out to be a > very complex devop task. > > While you pursue a bit different goal, have a look at what a minimalist > reverse proxy had to fulfill for us: > https://github.com/Parquery/revproxyry > > Cheers, > Marko > > Le sam. 23 mars 2019 à 18:30, Diego Bernardes > a écrit : > >> Hi, >> >> For the past weeks, I've been working in a personal project that I wanted >> to do for a long time. Is a programmable proxy. >> >> Load balancer, API Gateway, Cache, TLS termination, and so on, are all >> example of servers that run on typical stack. But why we need to run all >> these servers? Wouldn't be better having all this logic into a single >> server? And this is the core idea of this project. >> >> The idea is to enable deep customizations at the request path. This >> customization is done by injecting Go packages, called pipe, to handle the >> request. >> >> Everything is at a very early stage. I'm gonna focus now on the little >> and important things like the docs, logs, and metrics. >> >> >> Would love to hear your options and suggestions. >> >> https://github.com/pipehub/pipehub >> >> -- >> You received this message because you are subscribed to the Google Groups >> "golang-nuts" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to golang-nuts...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] [ANN] PipeHub: A programmable proxy server
Hi, For the past weeks, I've been working in a personal project that I wanted to do for a long time. Is a programmable proxy. Load balancer, API Gateway, Cache, TLS termination, and so on, are all example of servers that run on typical stack. But why we need to run all these servers? Wouldn't be better having all this logic into a single server? And this is the core idea of this project. The idea is to enable deep customizations at the request path. This customization is done by injecting Go packages, called pipe, to handle the request. Everything is at a very early stage. I'm gonna focus now on the little and important things like the docs, logs, and metrics. Would love to hear your options and suggestions. https://github.com/pipehub/pipehub -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: IDE/tools that support the new Go module feature in 1.11?
gometalinter and gotests are breaking for me. They were installed from vscode-go. Em sábado, 25 de agosto de 2018 09:45:11 UTC+1, nvcnvn escreveu: > > Hi all, > Do you know any IDE already support intellisense for a project using > "pure" Go module (without /vendor, $GOPATH) > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Question about parallel tests
If a test is marked as parallel, does the sub tests run in parallel too? Or should i mark then as parallel? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Question about flow of context
Got one question about the design of some packages using the new 'context' in golang. Let's assume we have a webserver, when some request get in, we can get the context from request, and this request can trigger several packages. What is the best way to send this context to the other packages? Pass a reference to it? Or pass a inner facet with something like 'WithValue'? I need to permeate the context to all the functions a web request can trigger inside the application, this is used to generate logs, metrics, errors, etc... What is the best aproach to solve this issue? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.