mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 01:12:25 -05:00
update modernc.org/sqlite to v1.37.0-concurrrency-workaround (#3958)
This commit is contained in:
parent
9c31e213ca
commit
fdf23a91de
64 changed files with 1070 additions and 8220 deletions
19
vendor/modernc.org/libc/mem.go
generated
vendored
19
vendor/modernc.org/libc/mem.go
generated
vendored
|
|
@ -121,6 +121,25 @@ func UsableSize(p uintptr) types.Size_t {
|
|||
return types.Size_t(memory.UintptrUsableSize(p))
|
||||
}
|
||||
|
||||
type MemAllocatorStat struct {
|
||||
Allocs int
|
||||
Bytes int
|
||||
Mmaps int
|
||||
}
|
||||
|
||||
// MemStat returns the global memory allocator statistics.
|
||||
// should be compiled with the memory.counters build tag for the data to be available.
|
||||
func MemStat() MemAllocatorStat {
|
||||
allocMu.Lock()
|
||||
defer allocMu.Unlock()
|
||||
|
||||
return MemAllocatorStat{
|
||||
Allocs: allocator.Allocs,
|
||||
Bytes: allocator.Bytes,
|
||||
Mmaps: allocator.Mmaps,
|
||||
}
|
||||
}
|
||||
|
||||
// MemAuditStart locks the memory allocator, initializes and enables memory
|
||||
// auditing. Finaly it unlocks the memory allocator.
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue