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


Grafana 11 Improves Metrics
11/04/2024

Grafana Labs, creators of the Grafana open-source metrics analytics and visualization suite, has announced the preview release of Grafana 11 with improvements to make it easier to view metrics, and ch [ ... ]



Avi Wigderson Gains Turing Award
16/04/2024

Israeli mathematician and computer scientist, Avi Wigderson, is the recipient of the 2023 ACM A.M Turing Award which carries a $1 million prize with financial support from Google.


More News

raspberry pi books

 

Comments




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