🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #1066

Creeping feature #769: `new auto'

#1066
From: Scott Layson Burson
Date: Thu, 02 May 1991 07:49
23 lines
1343 bytes
It struck me today that it would be awfully nice to have a high level,
type-safe interface to `alloca' (which allocates a block of memory of
specified size in the caller's stack frame).

A syntax is easily enough come by: `new auto <type>'.

This probably won't fly, since `alloca' is not in the ANSI library and
may be difficult to write for some implementations (though I can't
think why offhand), and so it will probably be considered something
that shouldn't be required in a C++ implementation.

Besides, any particular implementation can provide this functionality,
by overloading `::operator new'.  (On the other hand, different
implementors may choose different "placement" argument types to
specify stack allocation, and it would be nice if this were at least
semi-standard.)

Anyhow, caveats notwithstanding, having thought of this I couldn't
resist mentioning it.

-- Scott
Gyro@Reasoning.COM
Technical Details
Message-ID: <1991May2.074928.25507@kestrel.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!ucselx!petunia!kestrel.edu!gyro

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!ucselx!petunia!kestrel.edu!gyro
From: gyro@kestrel.edu (Scott Layson Burson)
Newsgroups: comp.std.c++
Subject: Creeping feature #769: `new auto'
Keywords: dynamic stack allocation, alloca
Message-ID: <1991May2.074928.25507@kestrel.edu>
Date: 2 May 91 07:49:28 GMT
Distribution: comp.std.c++
Organization: Kestrel Institute, Palo Alto, CA
Lines: 23