Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
92cb4099
Kaydet (Commit)
92cb4099
authored
May 22, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
concat-deps: Clean up memory at exit when run with lsan
Change-Id: I66ccb5332e6c5eceb2f199911ebd4296c93cac4b
üst
5db98613
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletion
+29
-1
concat-deps.c
solenv/bin/concat-deps.c
+29
-1
No files found.
solenv/bin/concat-deps.c
Dosyayı görüntüle @
92cb4099
...
...
@@ -74,6 +74,8 @@
#include <unistd.h>
#endif
#include <config_options.h>
/* modes */
#ifdef __windows
#define FILE_O_RDONLY _O_RDONLY
...
...
@@ -590,6 +592,11 @@ off_t size = -1;
return
size
;
}
#if !ENABLE_RUNTIME_OPTIMIZATIONS
static
void
*
file_load_buffers
[
100
];
static
size_t
file_load_buffer_count
=
0
;
#endif
static
char
*
file_load
(
const
char
*
name
,
off_t
*
size
,
int
*
return_rc
)
{
off_t
local_size
=
0
;
...
...
@@ -610,6 +617,20 @@ int fd;
if
(
!
(
fd
==
-
1
))
{
buffer
=
malloc
((
size_t
)(
*
size
+
1
));
#if !ENABLE_RUNTIME_OPTIMIZATIONS
if
(
buffer
!=
NULL
)
{
if
(
file_load_buffer_count
==
100
)
{
free
(
buffer
);
buffer
=
NULL
;
}
else
{
file_load_buffers
[
file_load_buffer_count
++
]
=
buffer
;
}
}
#endif
if
(
buffer
==
NULL
)
{
rc
=
ENOMEM
;
...
...
@@ -1089,7 +1110,7 @@ off_t in_list_size = 0;
char
*
in_list
;
char
*
in_list_cursor
;
char
*
in_list_base
;
struct
hash
*
dep_hash
;
struct
hash
*
dep_hash
=
0
;
const
char
*
env_str
;
if
(
argc
<
2
)
...
...
@@ -1149,6 +1170,13 @@ const char *env_str;
dep_hash
->
collisions
,
dep_hash
->
memcmp
,
dep_hash
->
cost
);
#endif
}
#if !ENABLE_RUNTIME_OPTIMIZATIONS
hash_destroy
(
dep_hash
);
for
(
size_t
i
=
0
;
i
!=
file_load_buffer_count
;
++
i
)
{
free
(
file_load_buffers
[
i
]);
}
#endif
return
rc
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment