Go 1.19 Revises Memory Model
Written by Kay Ewbank   
Monday, 15 August 2022

Go 1.19 has been released with a revised memory model, and changes to the implementation of the toolchain, runtime, and libraries.

Go is an open source project developed by a team at Google and many contributors from the open source community over more than 8 years. The main intended use is as a systems programming language, and it has been used in high profile commercial successes such as Docker.

goicon2

The Go memory model has been revised to align Go with the memory model used by C, C++, Java, JavaScript, Rust, and Swift. Go only provides sequentially consistent atomics, not any of the more relaxed forms found in other languages. Along with the memory model update, Go 1.19 introduces new types in the sync/atomic package that make it easier to use atomic values.

gopher

The runtime now includes support for a soft memory limit. This memory limit includes the Go heap and all other memory managed by the runtime, and excludes external memory sources such as mappings of the binary itself, memory managed in other languages, and memory held by the operating system on behalf of the Go program.

Go 1.19 adds support for links, lists, and clearer headings in doc comments, and error checking has been improved with the vet checker “errorsas” now correctly reporting when errors.As is called with a second argument of type *error". The developers say this is a common mistake. 

The core library has also been improved with support for new atomic types, specifically Bool, Int32, Int64, Uint32, Uint64, Uintptr, and Pointer.  Path lookups have also been changed so that Command and LookPath no longer allow results from a Path search to be found relative to the current directory - whether this is an improvement or not is questionable but the team says the change removes a common source of security problems in the form of issues involving Path lookups in untrusted directories that can lead to remote execution during the go get command.

Go 1.19  is available for download now.

goicon2

More Information

Go Download Page

GoLang Org Webpage

Related Articles

Why Is Go Good?

Go Survey 2021

Go 1.18 Released With Generics And Fuzzing

Insights Into Where Go Is Going

Go Adopts Generics

Go 1.15 Improves Linker

Go 2 Details Revealed

A Programmer's Guide To Go

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Data Wrangler Gets Copilot Integration
11/11/2024

Microsoft has announced that Copilot is being integrated into Data Wrangler. The move will give data scientists the ability to use natural language to clean and transform data, and to get help with fi [ ... ]



The Feds Want Us To Move On From C/C++
13/11/2024

The clamour for safe programming languages seems to be growing and becoming official. We have known for a while that C and C++ are dangerous languages so why has it become such an issue now and is it  [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info