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
9dfa4840
Kaydet (Commit)
9dfa4840
authored
Şub 28, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Missing @since tags, and adapt to semantics of posix_memalign
Change-Id: I677d973fbcf118111b5fc93b09143c66b0afb0d9
üst
757856e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
alloc.h
include/rtl/alloc.h
+11
-2
memory.c
sal/osl/unx/memory.c
+10
-3
No files found.
include/rtl/alloc.h
Dosyayı görüntüle @
9dfa4840
...
...
@@ -96,14 +96,20 @@ SAL_DLLPUBLIC void SAL_CALL rtl_freeZeroMemory (
)
SAL_THROW_EXTERN_C
();
/** Allocate memory.
/** Allocate
aligned
memory.
A call to this function will return NULL upon the requested
memory size being either zero or larger than currently allocatable.
@param Alignment alignment in bytes.
Memory obtained through this function must be freed with
rtl_freeAlignedMemory.
@param Alignment [in] alignment in bytes, must be a power of two multiple of
sizeof(void*).
@param Bytes [in] memory size.
@return pointer to allocated memory.
@since LibreOffice 4.3
*/
SAL_DLLPUBLIC
void
*
SAL_CALL
rtl_allocateAlignedMemory
(
sal_Size
Alignment
,
...
...
@@ -112,8 +118,11 @@ SAL_DLLPUBLIC void* SAL_CALL rtl_allocateAlignedMemory (
/** Free memory allocated with rtl_allocateAlignedMemory.
@param Ptr [in] pointer to previously allocated memory.
@return none. Memory is released. Ptr is invalid.
@since LibreOffice 4.3
*/
SAL_DLLPUBLIC
void
SAL_CALL
rtl_freeAlignedMemory
(
void
*
Ptr
...
...
sal/osl/unx/memory.c
Dosyayı görüntüle @
9dfa4840
...
...
@@ -19,9 +19,16 @@ void* osl_aligned_alloc( sal_Size align, sal_Size size )
#ifdef __ANDROID__
return
memalign
(
align
,
size
);
#else
void
*
ptr
;
int
err
=
posix_memalign
(
&
ptr
,
align
,
size
);
return
err
?
NULL
:
ptr
;
if
(
size
==
0
)
{
return
NULL
;
}
else
{
void
*
ptr
;
int
err
=
posix_memalign
(
&
ptr
,
align
,
size
);
return
err
?
NULL
:
ptr
;
}
#endif
}
...
...
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