On Tue, Nov 01, 2022 at 11:18:48AM -0700, Frank Jüdes wrote:
> I have to write a program that should verify the content of
> configuration-servers. It will need a lot of pre-initialized data to verify
> the actual content of a server, so it has to initialize many strings. What
> i know from
Just to add a tidbit to what Jan said. The key here is that strings (type
string) in Go are immutable, whereas strings ("char *" based types) in C
are not. That is why the same string can be used again and again without
ever needing to be copied, and why they can live in the text segment.
On
Just had an idea: I printed the address of the initialized variable, and
for comparison another variable that was created in the heap:
Address of package variable: 0x818710
Address of Program variable: 0xc10028
Imho it is a safe assumption that the initialized data-structure is not
located
Thank you very much for the answer! - It actually turns out that my
structure is a bit more complex than i though. The test-cases themself are
a structure of seven strings and one in64 which are organized as a
test-case list into a map[string] and those lists are organized into groups
also as
On Tue, Nov 1, 2022, 20:36 Frank Jüdes wrote:
> I have to write a program that should verify the content of
> configuration-servers. It will need a lot of pre-initialized data to verify
> the actual content of a server, so it has to initialize many strings. What
> i know from other C-style
I have to write a program that should verify the content of
configuration-servers. It will need a lot of pre-initialized data to verify
the actual content of a server, so it has to initialize many strings. What
i know from other C-style languages is, that code like
var MyString *string =