Skip to content

Lab 4,5#199

Open
MagicGiant wants to merge 1 commit intosomov7:mainfrom
MagicGiant:main
Open

Lab 4,5#199
MagicGiant wants to merge 1 commit intosomov7:mainfrom
MagicGiant:main

Conversation

@MagicGiant
Copy link

No description provided.

Copy link
Collaborator

@ju5tevg3niy ju5tevg3niy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лаб 5
Утечки памяти -0.5
Работа выполнена не до конца. В выходной файл --output выводится состояние Жизни после --max_iter N поколений. Должно быть было выведено каждое --dump_freq поколение -5
result 4.5

5.c
printf("\r");
for (int k = 0; k < n; k++)
{
char* arr_clone = malloc(x * y);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

=================================================================
==48559==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 105040 byte(s) in 10 object(s) allocated from:
    #0 0x7fcc746fabc8 in malloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10dbc8)
    #1 0x5622a39b62a5 in go_life /home/evgeniy/ITMO-Programming-C/MagicGiant/5.c:166
    #2 0x5622a39b6c2b in main /home/evgeniy/ITMO-Programming-C/MagicGiant/5.c:292
    #3 0x7fcc744220b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)

SUMMARY: AddressSanitizer: 105040 byte(s) leaked in 10 allocation(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants