github.com/primecitizens/pcz/std@v0.2.1/core/alloc/sbrkalloc/os_wasi.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright 2023 The Prime Citizens
     3  //
     4  // Copyright 2023 The Go Authors. All rights reserved.
     5  // Use of this source code is governed by a BSD-style
     6  // license that can be found in the LICENSE file.
     7  
     8  //go:build wasm && wasip1
     9  
    10  package sbrkalloc
    11  
    12  func init() {
    13  	_start = uintptr(Sbrk(0))
    14  	base = _start
    15  	end = _start
    16  	lastFree = nil
    17  }
    18  
    19  func resetMemoryDataView() {
    20  	// This function is a no-op on WASI, it is only used to notify the browser
    21  	// that its view of the WASM memory needs to be updated when compiling for
    22  	// GOOS=js.
    23  }