Xojo Conferences
XDCMay2019MiamiUSA

Re: allocation conflict, OSalloclen anyone? (Real Studio Plugins Mailinglist archive)

Back to the thread list
Previous thread: Preventing RB from handling the focus in the window
Next thread: Re: allocation conflict, huge memory leaking!


macosx and unix paths   -   GOLD
  Re: allocation conflict, OSalloclen anyone?   -   Thomas Tempelmann
   Re: allocation conflict, OSalloclen anyone?   -   Aaron Ballman

Re: allocation conflict, OSalloclen anyone?
Date: 12.06.04 23:30 (Sun, 13 Jun 2004 00:30:20 +0200)
From: Thomas Tempelmann
Has anyone used "OSalloclen" yet? That seems to be a central
memory allocation function (which is, BTW, also responsible
for the slow compile and runtime under OS 9 as I've found
out a few weeks ago).

Its declaration is as follows:

Ptr OSalloclen (long size, MemFullHandling x);

You pass the size and get back a ptr, similarly to a malloc() call.

Problem is: What does that MemFullHandling parm do and what is
one to pass?

Second question: Will this function be available on Windows, too?
I only know how to look at code on Mac OS (using "The Fragmalyzer"),
but how would I search for exported symbols on Windows?

Thomas

Re: allocation conflict, OSalloclen anyone?
Date: 13.06.04 00:39 (Sat, 12 Jun 2004 18:39:45 -0500)
From: Aaron Ballman
> Ptr OSalloclen (long size, MemFullHandling x);
>
> You pass the size and get back a ptr, similarly to a malloc() call.
>
> Problem is: What does that MemFullHandling parm do and what is
> one to pass?

It allows you to try to return nil if we can't allocate the memory you
request.

> Second question: Will this function be available on Windows, too?
> I only know how to look at code on Mac OS (using "The Fragmalyzer"),
> but how would I search for exported symbols on Windows?

It will work on Windows as well so long as it's exported (same with Linux).
I am pretty sure it's exported, but I don't have the code in front of me to
check.

~Aaron

_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>