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


Eclipse Temurin OpenJDK Now Supported By Red Hat
27/09/2022

There's now yet another reason to opt for Eclipse's Temurin version of OpenJDK among the rest of the builds - LTS support provided by Red Hat.



The Bamboo Garden Trimming Problem - Fun CS Theory
18/09/2022

Today is World Bamboo Day which, since 2009, is observed on September 18 in order to raise awareness about the conservation of this extremely useful plant. It reminded me of an algoritrhmic puzzl [ ... ]


More News

pythondata

 



 

Comments




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