how to get dirt memory in go

181 views
Skip to first unread message

Vasiliy Tolstov

unread,
Jan 14, 2025, 8:44:40 AMJan 14
to golan...@googlegroups.com
Hi! I'm try to search answers but have no luck. In go i can create
memory arena/ buffer pool etc..
But does it possible to get memory with like make([]byte, XXX) but
without calloc for this memory?

So i need to get raw memory from kernel without spending time to clearing it.

--
Vasiliy Tolstov,
e-mail: v.to...@selfip.ru

Jan Mercl

unread,
Jan 14, 2025, 8:50:21 AMJan 14
to Vasiliy Tolstov, golan...@googlegroups.com
On Tue, Jan 14, 2025 at 2:44 PM Vasiliy Tolstov <v.to...@selfip.ru> wrote:

> Hi! I'm try to search answers but have no luck. In go i can create
> memory arena/ buffer pool etc..
> But does it possible to get memory with like make([]byte, XXX) but
> without calloc for this memory?

Not sure if it's what you're after, but maybe take a look at
https://pkg.go.dev/modernc.org/memory

tapi...@gmail.com

unread,
Jan 15, 2025, 2:57:36 AMJan 15
to golang-nuts

Vasiliy Tolstov

unread,
Jan 16, 2025, 3:19:43 AMJan 16
to tapi...@gmail.com, golang-nuts
Thanks, i'm check bench with modernc

ср, 15 янв. 2025 г. в 10:57, tapi...@gmail.com <tapi...@gmail.com>:
> --
> 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.
> To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/c3473a74-abdd-4870-a453-c9a6b5b635cbn%40googlegroups.com.

Vasiliy Tolstov

unread,
Jan 16, 2025, 3:21:59 AMJan 16
to Jan Mercl, Vasiliy Tolstov, golan...@googlegroups.com
Thanks, i'm check

вт, 14 янв. 2025 г. в 16:49, Jan Mercl <0xj...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages