Project

General

Profile

Actions

Bug #1328

closed

[PATCH]

Added by vince.dragonfly about 15 years ago. Updated almost 15 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

I am attempting to compile FreeSWITCH (http://www.freeswitch.org/).

I get the following error.

Compiling src/switch_core.c ...
src/switch_core.c: In function `switch_core_setrlimits':
src/switch_core.c:795: error: `RLIMIT_AS' undeclared (first use in this
function)

Some of the other BSDs apparently don't have it either but FreeBSD has
it defined in /usr/include/sys/resource.h as

#define RLIMIT_AS       RLIMIT_VMEM     /* standard name for RLIMIT_VMEM */

Apparently it is also defined in Linux as well.

Should this be added to DragonFly?


Files

rlimit.diff (1.13 KB) rlimit.diff Anonymous, 05/26/2009 07:27 AM
Actions #1

Updated by alexh almost 15 years ago

In my opinion this should be fixed in FreeSWITCH by changing RLIMIT_AS to
RLIMIT_VMEM. If this is in pkgsrc, it should be fixed there.
Neither NetBSD nor OpenBSD have RLIMIT_AS and there is no need for it if it'll be
just the same as RLIMIT_VMEM.

Actions #2

Updated by alexh almost 15 years ago

I've just seen that RLIMIT_AS is actually POSIX:
http://www.opengroup.org/onlinepubs/009695399/functions/getrlimit.html

So we should add it. It'll probably happen during GSoC (POSIX Compliance Project).

Actions #3

Updated by vince.dragonfly almost 15 years ago

On Wed, May 06, 2009 at 09:57:49AM +0000, Alex Hornung (via DragonFly issue tracker) wrote:

Alex Hornung <> added the comment:

In my opinion this should be fixed in FreeSWITCH by changing RLIMIT_AS to
RLIMIT_VMEM. If this is in pkgsrc, it should be fixed there.
Neither NetBSD nor OpenBSD have RLIMIT_AS and there is no need for it if it'll be
just the same as RLIMIT_VMEM.

Actually, it turns out that NetBSD does have it also.

resource.h:
#define RLIMIT_AS 10 /* virtual process size (inclusive of mmap) /
#define RLIMIT_VMEM RLIMIT_AS /
common alias */

OpenBSD seems to be the only one that does not have it.

By the way, FreeSWITCH is not in pkgsrc. I was trying to compile it
natively. However, the RLIMIT_AS issue was not the only one. Every
time I fixed one problem there was another. Apparently it is very Linux
centric. I don't have a lot of time to work on it so I gave up for now
and am going to take a closer look at yate.

On Fri, May 08, 2009 at 06:44:51AM +0000, Alex Hornung (via DragonFly issue tracker) wrote:

Alex Hornung <> added the comment:

I've just seen that RLIMIT_AS is actually POSIX:
http://www.opengroup.org/onlinepubs/009695399/functions/getrlimit.html

So we should add it. It'll probably happen during GSoC (POSIX Compliance Project).

Thanks for following up on this. It is looking to me like RLIMIT_AS is (or is
becoming?) more of the standard and RLIMIT_VMEM is BSD specific. I do not
see any mention of RLIMIT_VMEM in the posix specifications and Linux does not
seem to support it either. At least it did not show up when I grep'd the
Linux headers under /archive/Linux-2.6.13.1 on leaf for it.

Actions #4

Updated by alexh almost 15 years ago

RLIMIT_AS definitely seems to be the only real standard here, so I would suggest
to add it for POSIX compliance.

This is Beket's expertise, so I'll just leave it like this.

Actions #5

Updated by Anonymous almost 15 years ago

: RLIMIT_AS definitely seems to be the only real standard here,
: so I would suggest to add it for POSIX compliance.
:
: This is Beket's expertise, so I'll just leave it like this.

Sorry for the delayed response, grabbed!

Cheers,
Stathis

Actions #6

Updated by Anonymous almost 15 years ago

: RLIMIT_AS definitely seems to be the only real standard here,

Anyone any thoughts regarding the attached patch ?

Cheers,
Stathis

Actions #7

Updated by Anonymous almost 15 years ago

RLIMIT_AS definitely seems to be the only real standard here,

Anyone any thoughts regarding the attached patch ?

Unless no one objects in the next couple of days, I'll push it.

Cheers,
Stathis

Actions #8

Updated by Anonymous almost 15 years ago

RLIMIT_AS definitely seems to be the only real standard here,

Committed !
a874e0b7827b04e8d4e0d2454639e2fd9aa33220

Actions #9

Updated by dillon almost 15 years ago

:Stathis Kamperis <> added the comment:
:
:: RLIMIT_AS definitely seems to be the only real standard here,
:
:Anyone any thoughts regarding the attached patch ?
:
:Cheers,
:Stathis

This might create issues if a pkgsrc package is switch()ing on
the RLIMIT cases and tries to switch on both RLIMIT_VMEM and
RLIMIT_AS.
If RLIMIT_VMEM is not used as much we might be able to just
flat-out rename it to RLIMIT_AS. The question is whether it
would be beneficial to the pkgsrc build or not.
-Matt
Actions

Also available in: Atom PDF