In article <11**********************@g47g2000cwa.googlegroups .com>,
Priya Mishra <mi*******@gmail.com> wrote:
I have been given the work that I have to remove all the runtime
library's internal memory sub-allocation with the local_malloc
function which is going to do all the static memory allocation.
I have the library source code in which I have to remove
all the calloc and malloc,
please help me from where to start I am newbe.
Is there a possible mechanical translation between the existing calls
and the new calls? For example, "use the second parameter first,
followed by the constant 65535, followed by the first parameter" ? If
such a mechanical translation is possible then depending on the
complexity of the call sequence (e.g., embedded comments, split over
several lines) I would use an editor with regular expression
matching, or 'sed', or 'awk', or 'perl' to do the transformation.
This is a C newsgroup, so of course you could also write a C program
to do the mechanical transformation, but tools such as perl have
a lot of built-in text matching and manipulation features that would
tend to make it easier to use those tools than to write the corresponding
C program.
If no mechanical translation is possible, then you haven't really
given us enough information to go on for us to be of assistance.
--
I was very young in those days, but I was also rather dim.
-- Christopher Priest