I find a way to limit memory usage in Go. My Go-based application has big data that needs to be loaded into main memory, so I want to limit the maximum process memory size to the size specified by the user.
In C, in fact, I am accumulating malloc'ed memory sizes for this, but I donβt know how to do the same in Go.
Please let me know if there is a way to do this.
Thanks.
Brian source share