× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




c400-l-bounces+seurer=us.ibm.com@xxxxxxxxxxxx wrote on 12/03/2010 01:46:57
PM:

From: "Schmidt, Mihael" <Mihael.Schmidt@xxxxxxxxxxx>
Subject: [C400-L] no alloca() available - alternative?

the ported software uses alloca() at some locations. Obviously
alloca() is not support on IBM i. What is the alternative? malloc?
What do I have to take into account when changing this to malloc?
(besides freeing the memory afterwards)

Thanx in advance

Mihael Schmidt


#include <mih/modasa.h> and then use _MODASA or modasa (both defined in the
header file). They work essentially the same as alloca. In fact, you
could a #define somewhere so that you wouldn't have to change your code
much other than the include and define.

See
http://publib.boulder.ibm.com/infocenter/iseries/v6r1m0/topic/rzajp/sc092418.pdf
--
-Bill

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.