Re: Inline Assembly - Runtime Stack Allocation
From: Richard Bos (rlb_at_hoekstra-uitgeverij.nl)
Date: 07/01/04
- Next message: Richard Bos: "Re: time output in milliseconds"
- Previous message: Severian: "Re: Inline Assembly - Runtime Stack Allocation"
- In reply to: Brian Lindahl: "Inline Assembly - Runtime Stack Allocation"
- Next in thread: jacob navia: "Re: Inline Assembly - Runtime Stack Allocation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 01 Jul 2004 07:11:32 GMT
lindahlb@hotmail.com (Brian Lindahl) wrote:
> I'm using a temporary buffer to transfer some data and would rather
> not allocate it on the heap. The problem is that the size of the
> buffer is only known upon entry into the function that utilizes it and
> I'd rather not waste space or dynamically allocate on the heap (since
> it doesn't need to persist). Now I'm planning on utilizing inline
> assembly to modify the stack pointer directly to allocate the space I
> need.
This is usually a very, very bad idea. What actual reasons have you for
_not_ using malloc(), which is quite nicely suited to this task? Come to
think of it, since you're using this space only as a transfer buffer,
why can't you transfer your data in fixed-size chunks?
Richard
- Next message: Richard Bos: "Re: time output in milliseconds"
- Previous message: Severian: "Re: Inline Assembly - Runtime Stack Allocation"
- In reply to: Brian Lindahl: "Inline Assembly - Runtime Stack Allocation"
- Next in thread: jacob navia: "Re: Inline Assembly - Runtime Stack Allocation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|