I had to patch the firefox source to use posix_madvise, and it worked :)
Thanx,
Gabriele.
Da:
Gabriele Bulfon
A:
[email protected]
Data:
15 novembre 2013 18.05.02 CET
Oggetto:
Re: [discuss] enable madvise compile time
What I noticed, is that source is looking for both an mmap and madivse call 
with first argument "void *",
then I see the mman.h section below, defining the mmap void version but no 
madvise void version,
later (other define sectioin), it defines both with caddr_t.
I guess something is missing in the first void section?
line 222 of mman.h:
#ifdef  __STDC__
#if (_POSIX_C_SOURCE2) || defined(_XPG4_2)
extern void *mmap(void *, size_t, int, int, int, off_t);
extern int munmap(void *, size_t);
extern int mprotect(void *, size_t, int);
extern int msync(void *, size_t, int);
#if (!defined(_XPG4_2) || (_POSIX_C_SOURCE2)) || defined(__EXTENSIONS__)
extern int mlock(const void *, size_t);
extern int munlock(const void *, size_t);
#endif  /* (!defined(_XPG4_2) || (_POSIX_C_SOURCE2))... */
/* transitional large file interface version */
#if     defined(_LARGEFILE64_SOURCE) & !((_FILE_OFFSET_BITS == 64) & \
!defined(__PRAGMA_REDEFINE_EXTNAME))
extern void *mmap64(void *, size_t, int, int, int, off64_t);
#endif  /* _LARGEFILE64_SOURCE... */
#else   /* (_POSIX_C_SOURCE2) || defined(_XPG4_2) */
extern caddr_t mmap(caddr_t, size_t, int, int, int, off_t);
extern int munmap(caddr_t, size_t);
extern int mprotect(caddr_t, size_t, int);
extern int msync(caddr_t, size_t, int);
extern int mlock(caddr_t, size_t);
extern int munlock(caddr_t, size_t);
extern int mincore(caddr_t, size_t, char *);
extern int memcntl(caddr_t, size_t, int, caddr_t, int, int);
extern int madvise(caddr_t, size_t, int);
Da:
Richard Lowe
A:
Illumos Discussion
Data:
15 novembre 2013 17.46.56 CET
Oggetto:
Re: [discuss] enable madvise compile time
I'm working from memory, and have not checked the source, but I believe madvise 
is one of the symbols which our headers hide from the namespace entirely -- and 
incorrectly -- in some standards configurations.  You may want to double check 
whether that's happening and if so file (and fix?) a bug.
illumos-discuss
|
Archives
|
Modify
Your Subscription
illumos-discuss
|
Archives
|
Modify
Your Subscription



-------------------------------------------
illumos-discuss
Archives: https://www.listbox.com/member/archive/182180/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182180/21175430-2e6923be
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=21175430&id_secret=21175430-6a77cda4
Powered by Listbox: http://www.listbox.com

Reply via email to