Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #65971 > unrolled thread
| Started by | janus <emekamicro@gmail.com> |
|---|---|
| First post | 2015-07-20 05:36 -0700 |
| Last post | 2015-07-20 14:57 -0700 |
| Articles | 17 — 10 participants |
Back to article view | Back to comp.lang.c
Allocating memory styles janus <emekamicro@gmail.com> - 2015-07-20 05:36 -0700
Re: Allocating memory styles Noob <root@127.0.0.1> - 2015-07-20 14:53 +0200
Re: Allocating memory styles janus <emekamicro@gmail.com> - 2015-07-20 07:23 -0700
Re: Allocating memory styles Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-07-20 16:40 +0100
Re: Allocating memory styles janus <emekamicro@gmail.com> - 2015-07-20 12:19 -0700
Re: Allocating memory styles Richard Heathfield <rjh@cpax.org.uk> - 2015-07-20 14:07 +0100
Re: Allocating memory styles Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-07-20 14:18 +0100
Re: Allocating memory styles jt@toerring.de (Jens Thoms Toerring) - 2015-07-20 13:47 +0000
Re: Allocating memory styles Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-07-20 15:21 +0100
Re: Allocating memory styles Johann Klammer <klammerj@NOSPAM.a1.net> - 2015-07-20 16:27 +0200
Re: Allocating memory styles luser droog <luser.droog@gmail.com> - 2015-07-20 12:34 -0700
Re: Allocating memory styles Keith Thompson <kst-u@mib.org> - 2015-07-20 14:00 -0700
Re: Allocating memory styles luser droog <luser.droog@gmail.com> - 2015-07-20 20:29 -0700
Re: Allocating memory styles raltbos@xs4all.nl (Richard Bos) - 2015-07-22 15:21 +0000
Re: Allocating memory styles janus <emekamicro@gmail.com> - 2015-07-20 14:13 -0700
Re: Allocating memory styles "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-07-20 14:54 -0700
Re: Allocating memory styles "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-07-20 14:57 -0700
| From | janus <emekamicro@gmail.com> |
|---|---|
| Date | 2015-07-20 05:36 -0700 |
| Subject | Allocating memory styles |
| Message-ID | <0591b244-c066-4714-afad-3ba8db4a8676@googlegroups.com> |
Hello All, I am going through a book and I stumbled on this class of memory allocation: void* p = calloc(1, class->size); *(const struct Class**) P = class; The last line is what is hard for me to understand. Why casting to pointer-to-pointer, and then dereference it immediately? My understanding is that struct Class is the first element in P struct, so by casting P struct by struct class, one immediately has access to the first element of the struct. This makes sense to me. But why using pointer-to-pointer? I was thinking that the same thing might be achieved by this: (const struct Class*) P = class; Regards, \Emeka
[toc] | [next] | [standalone]
| From | Noob <root@127.0.0.1> |
|---|---|
| Date | 2015-07-20 14:53 +0200 |
| Message-ID | <moiqt2$5i5$1@dont-email.me> |
| In reply to | #65971 |
On 20/07/2015 14:36, janus wrote: > I am going through a book and I stumbled on this class of memory allocation: > > void* p = calloc(1, class->size); > > *(const struct Class**) P = class; http://www.catb.org/esr/faqs/smart-questions.html You should provide a program that compiles, even for trivial code. People trying to help you shouldn't have to guess about the parts you left out. (In this case, the definition of "struct Class", and the initialization of "class".) The intent may have been to write something along these lines: struct Class *foo = malloc(sizeof *foo); *foo = class; Regards.
[toc] | [prev] | [next] | [standalone]
| From | janus <emekamicro@gmail.com> |
|---|---|
| Date | 2015-07-20 07:23 -0700 |
| Message-ID | <49e112fe-0bfc-4231-b2d6-86e42d7e30b4@googlegroups.com> |
| In reply to | #65973 |
On Monday, July 20, 2015 at 1:53:28 PM UTC+1, Noob wrote:
> On 20/07/2015 14:36, janus wrote:
>
> > I am going through a book and I stumbled on this class of memory allocation:
> >
> > void* p = calloc(1, class->size);
> >
> > *(const struct Class**) P = class;
>
> http://www.catb.org/esr/faqs/smart-questions.html
>
> You should provide a program that compiles, even for trivial code.
> People trying to help you shouldn't have to guess about the parts
> you left out. (In this case, the definition of "struct Class", and
> the initialization of "class".)
>
> The intent may have been to write something along these lines:
>
> struct Class *foo = malloc(sizeof *foo);
> *foo = class;
>
> Regards.
On Monday, July 20, 2015 at 1:53:28 PM UTC+1, Noob wrote:
> On 20/07/2015 14:36, janus wrote:
>
> > I am going through a book and I stumbled on this class of memory allocation:
> >
> > void* p = calloc(1, class->size);
> >
> > *(const struct Class**) P = class;
>
> http://www.catb.org/esr/faqs/smart-questions.html
>
> You should provide a program that compiles, even for trivial code.
> People trying to help you shouldn't have to guess about the parts
> you left out. (In this case, the definition of "struct Class", and
> the initialization of "class".)
>
> The intent may have been to write something along these lines:
>
> struct Class *foo = malloc(sizeof *foo);
> *foo = class;
>
> Regards.
On Monday, July 20, 2015 at 1:53:28 PM UTC+1, Noob wrote:
> On 20/07/2015 14:36, janus wrote:
>
> > I am going through a book and I stumbled on this class of memory allocation:
> >
> > void* p = calloc(1, class->size);
> >
> > *(const struct Class**) P = class;
>
> http://www.catb.org/esr/faqs/smart-questions.html
>
> You should provide a program that compiles, even for trivial code.
> People trying to help you shouldn't have to guess about the parts
> you left out. (In this case, the definition of "struct Class", and
> the initialization of "class".)
>
> The intent may have been to write something along these lines:
>
> struct Class *foo = malloc(sizeof *foo);
> *foo = class;
>
> Regards.
Sorry that I didn't reproduce the whole code and the typos. I have the code below.Everything, I didn't pen a single one except to copy and paste. I have noticed that most of you have issues reading pasted codes. Is there a way I could improve?
struct String {
const void * class;
char * text;
};
struct Class {
size_t size;
void * (* ctor) (void * self, va_list * app);
void * (* dtor) (void * self);
void * (* clone) (const void * self);
int (* differ) (const void * self, const void * b);
}
void * new (const void * _class, ...)
{
const struct Class * class = _class;
void * p = calloc(1, class --> size);
assert(p);
* (const struct Class **) p = class;
if (class --> ctor)
{
va_list ap;
va_start(ap, _class);
p = class --> ctor(p, & ap);
va_end(ap);
}
return p;
}
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2015-07-20 16:40 +0100 |
| Message-ID | <87zj2q6dnn.fsf@bsb.me.uk> |
| In reply to | #65989 |
janus <emekamicro@gmail.com> writes:
Your quoting is still wrong. This message had three copies of the post
you are replying to!
> Sorry that I didn't reproduce the whole code and the typos. I have the
> code below.Everything, I didn't pen a single one except to copy and
> paste. I have noticed that most of you have issues reading pasted
> codes. Is there a way I could improve?
Not sure what you mean by that. The code you posted before confused p
and P but was accurate enough for an educated guess (i.e. my explanation
stands). Given that what you post below is a little different, I think
you need to check if your cut and paste is working as you expect.
> struct String {
> const void * class;
> char * text;
> };
This is as I thought. p points to a structure with a pointer as the
first element.
<snip>
> const struct Class * class = _class;
> void * p = calloc(1, class --> size);
> assert(p);
> * (const struct Class **) p = class;
Apart from the --> and (p rather than P) this is what you posted
before. Does my explanation not help at all?
Since _class is a void *, and the target of the assignment is also a
void * I might have written *(const void **)p = _class; but then again I
think I would try to avoid having quite so many void *s around in the
first place.
<snip>
--
Ben.
[toc] | [prev] | [next] | [standalone]
| From | janus <emekamicro@gmail.com> |
|---|---|
| Date | 2015-07-20 12:19 -0700 |
| Message-ID | <dcf161f9-11fc-4657-a6ab-f16fc0b5d63d@googlegroups.com> |
| In reply to | #66004 |
On Monday, July 20, 2015 at 4:40:21 PM UTC+1, Ben Bacarisse wrote:
> janus <emekamicro@gmail.com> writes:
>
> Your quoting is still wrong. This message had three copies of the post
> you are replying to!
>
> > Sorry that I didn't reproduce the whole code and the typos. I have the
> > code below.Everything, I didn't pen a single one except to copy and
> > paste. I have noticed that most of you have issues reading pasted
> > codes. Is there a way I could improve?
>
> Not sure what you mean by that. The code you posted before confused p
> and P but was accurate enough for an educated guess (i.e. my explanation
> stands). Given that what you post below is a little different, I think
> you need to check if your cut and paste is working as you expect.
>
> > struct String {
> > const void * class;
> > char * text;
> > };
>
> This is as I thought. p points to a structure with a pointer as the
> first element.
>
> <snip>
> > const struct Class * class = _class;
> > void * p = calloc(1, class --> size);
> > assert(p);
> > * (const struct Class **) p = class;
>
> Apart from the --> and (p rather than P) this is what you posted
> before. Does my explanation not help at all?
>
> Since _class is a void *, and the target of the assignment is also a
> void * I might have written *(const void **)p = _class; but then again I
> think I would try to avoid having quite so many void *s around in the
> first place.
>
> <snip>
> --
> Ben.
Ben and others,
Thanks so much!!
[toc] | [prev] | [next] | [standalone]
| From | Richard Heathfield <rjh@cpax.org.uk> |
|---|---|
| Date | 2015-07-20 14:07 +0100 |
| Message-ID | <moiroh$895$1@dont-email.me> |
| In reply to | #65971 |
On 20/07/15 13:36, janus wrote:
> Hello All,
>
>
> I am going through a book and I stumbled on this class of memory allocation:
>
> void* p = calloc(1, class->size);
>
> *(const struct Class**) P = class;
My first question would be: by P, do you mean p? (Or, conversely, by p,
do you mean P?) C is case-sensitive.
My best guess is that what he meant to write is:
void *p = calloc(1, class->size);
if(p != NULL)
{
memcpy(p, class, class->size);
}
else
{
handle the lack of memory in some sensible way
}
If in doubt, don't cast. If in doubt and still tempted to cast, still
don't cast. If still in doubt and still tempted to cast, ask comp.lang.c
to show you how to achieve your objective in a better way.
There are a very few problems for which casting is the right solution,
but they are extraordinarily few and terribly far between. The above is
not one of those problems.
--
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2015-07-20 14:18 +0100 |
| Message-ID | <87mvyr6k83.fsf@bsb.me.uk> |
| In reply to | #65971 |
janus <emekamicro@gmail.com> writes: > I am going through a book and I stumbled on this class of memory allocation: > > void* p = calloc(1, class->size); I'm going to assume that should be P rather than p. Everywhere else you talk about P. > *(const struct Class**) P = class; > > The last line is what is hard for me to understand. Why casting to > pointer-to-pointer, and then dereference it immediately? My > understanding is that struct Class is the first element in P struct, > so by casting P struct by struct class, one immediately has access to > the first element of the struct. This makes sense to me. You are confusing structs and pointers all over the place here. It's not helped by the fact that you are being careless about case. The book uses "Class" for a struct tag and "class" for pointer to something (probably struct Class but you don't show us that part) so you need to be very careful how you write. Anyway, I think you'll find that P points to structure whose first element is a pointer to a struct Class. Writing this: *(T *)ptr = x; is a way to pretend that ptr points to an object of type T. (If you had a pointer of the right type already you could just write *ptr = x; but your book is playing games with the types in order to build an object system in C.) Your line has exactly this form but T just happens to be a pointer type: *((struct Class *) *)P = class; I.e. pretend that P points to a pointer to a struct Class and set that struct Class pointer to the value of "class" > But why using > pointer-to-pointer? You've just lost a level of indirection along the way. The first element in the thing pointed to by P is, in fact, a pointer. > I was thinking that the same thing might be achieved by this: > > (const struct Class*) P = class; That fails for a couple of reasons, not least that you can't assign to the result of cast. The posh wording for this is that a cast expression is not an lvalue. (If I've guessed wrong, please post all the relevant declarations.) -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | jt@toerring.de (Jens Thoms Toerring) |
|---|---|
| Date | 2015-07-20 13:47 +0000 |
| Message-ID | <d14cg3Faap9U1@mid.uni-berlin.de> |
| In reply to | #65971 |
janus <emekamicro@gmail.com> wrote:
> I am going through a book and I stumbled on this class of memory allocation:
> void* p = calloc(1, class->size);
> *(const struct Class**) P = class;
> The last line is what is hard for me to understand. Why casting to pointer-to-pointer, and then dereference it immediately? My understanding is that struct Class is the first element in P struct, so by casting P struct by struct class, one immediately has access to the first element of the struct. This makes sense to me. But why using pointer-to-pointer?
> I was thinking that the same thing might be achieved by this:
> (const struct Class*) P = class;
No, with that you'd have an rvalue on the left hand side -
the result of a cast is a value, the value of what's stored
in 'p', but with a different type attached to it, and not a
(new) variable that you can assign to (try it out and see
what the compiler is going to tell you).
But the original code is rather strange. 'class' obviously
must be a pointer (to some kind of structure), otherwise
'class->size' would be a syntax errer. And 'p' seems to be
intended to be used as another pointer to such a structure,
or the second line makes no sense. But does the expression
'class->size' really is the size of such a pointer? Without
looking at the code I'd be rather worried it isn't. And I'd
definitely write it differently to avoid such worries, i.e.
by using
void * p = malloc( sizeof class );
(the use of calloc() also makes no sense here and zero-
ing elements that way only works reliably for integers
anyway).
Then the value of 'class' is copied over to 'p', making
them both point to the same structure.
Without any more information to go by my gut-feeling
is that someone actually wanted to make a copy of the
structure 'class' points to, but messed up. In that
case 'slass->size' would be the size of such a struc-
ture (but which still could have been written more
clearly as 'sizeof *class') but then the assignment to
'p' from 'class' is wrong, it would have to be
* ( struct Class const * ) p = *class;
(which works because you can copy structures by value).
Or did you make a mistake when copying the code (as you
rather likely did when mixing up 'p' and 'P' - that's
two different identifiers)?
The next question, of course, is why making 'p' a void
pointer instead of what it's intended use is? Using the
proper type would make the ugly cast unnecessary...
Regards, Jens
--
\ Jens Thoms Toerring ___ jt@toerring.de
\__________________________ http://toerring.de
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2015-07-20 15:21 +0100 |
| Message-ID | <87egk27vup.fsf@bsb.me.uk> |
| In reply to | #65984 |
jt@toerring.de (Jens Thoms Toerring) writes: > janus <emekamicro@gmail.com> wrote: >> I am going through a book and I stumbled on this class of memory allocation: > >> void* p = calloc(1, class->size); > >> *(const struct Class**) P = class; > >> The last line is what is hard for me to understand. Why casting to >> pointer-to-pointer, and then dereference it immediately? My >> understanding is that struct Class is the first element in P struct, >> so by casting P struct by struct class, one immediately has access >> to the first element of the struct. This makes sense to me. But why >> using pointer-to-pointer? > >> I was thinking that the same thing might be achieved by this: > >> (const struct Class*) P = class; > > No, with that you'd have an rvalue on the left hand side - > the result of a cast is a value, the value of what's stored > in 'p', but with a different type attached to it, and not a > (new) variable that you can assign to (try it out and see > what the compiler is going to tell you). > > But the original code is rather strange. 'class' obviously > must be a pointer (to some kind of structure), otherwise > 'class->size' would be a syntax errer. And 'p' seems to be > intended to be used as another pointer to such a structure, > or the second line makes no sense. My guess: P is supposed to point to an "object" of the class described by the structure pointed to by the class variable. The very first member of such an object is a pointer to it's class description. That's my guess at least. I've seen that sort of code about dozen times because there was a time when every one write their own object system in C. <snip> -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | Johann Klammer <klammerj@NOSPAM.a1.net> |
|---|---|
| Date | 2015-07-20 16:27 +0200 |
| Message-ID | <moj0ge$hea$2@speranza.aioe.org> |
| In reply to | #65971 |
On 07/20/2015 02:36 PM, janus wrote: > Hello All, > > > I am going through a book and I stumbled on this class of memory > allocation: > > void* p = calloc(1, class->size); > > *(const struct Class**) P = class; > > The last line is what is hard for me to understand. Why casting to > pointer-to-pointer, and then dereference it immediately? My > understanding is that struct Class is the first element in P struct, > so by casting P struct by struct class, one immediately has access to > the first element of the struct. This makes sense to me. But why > using pointer-to-pointer? > > I was thinking that the same thing might be achieved by this: > > (const struct Class*) P = class; Regards, \Emeka > can you show the whole snippet? I think something is missing... There are special ways of initializing structs(I believe libfreetype uses such)... might be related to this... > error = FT_New_Face( library, "/usr/share/fonts/truetype/arial.ttf", > 0, &face ); They have face be a pointer type, then &face is a pointer to a pointer. So they can set *face=NULL inside the function, if stuff goes wrong. Would not work by-value. (It would 'work' as face=NULL, but not visible outside).
[toc] | [prev] | [next] | [standalone]
| From | luser droog <luser.droog@gmail.com> |
|---|---|
| Date | 2015-07-20 12:34 -0700 |
| Message-ID | <414ed265-aa8c-47f2-a2a3-83a4fca16c4c@googlegroups.com> |
| In reply to | #65971 |
On Monday, July 20, 2015 at 7:36:16 AM UTC-5, janus wrote: > Hello All, > > > I am going through a book and I stumbled on this class of memory allocation: > > void* p = calloc(1, class->size); > > *(const struct Class**) P = class; > > The last line is what is hard for me to understand. Why casting to pointer-to-pointer, and then dereference it immediately? My understanding is that struct Class is the first element in P struct, so by casting P struct by struct class, one immediately has access to the first element of the struct. This makes sense to me. But why using pointer-to-pointer? > > I was thinking that the same thing might be achieved by this: > > (const struct Class*) P = class; > Regards, \Emeka You should read the first two chapters of Objected Oriented Programming with ANSI-C by Axel T Schreiner. www.cs.rit.edu/~ats/books/ooc.pdf
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2015-07-20 14:00 -0700 |
| Message-ID | <lnzj2qee88.fsf@kst-u.example.com> |
| In reply to | #66046 |
luser droog <luser.droog@gmail.com> writes:
[...]
> You should read the first two chapters of Objected Oriented Programming
> with ANSI-C by Axel T Schreiner. [DELETED]/ooc.pdf
That PDF is missing the first few introductory pages (it starts with
page v, Roman numeral 5). That's where I would expect the copyright
notice to be; I find the fact that it's missing highly suspicious.
The same site links to a copy of K&R, which is even more suspicious.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | luser droog <luser.droog@gmail.com> |
|---|---|
| Date | 2015-07-20 20:29 -0700 |
| Message-ID | <87dcf815-3d79-4d40-b2b2-cf05dd015037@googlegroups.com> |
| In reply to | #66060 |
On Monday, July 20, 2015 at 4:00:50 PM UTC-5, Keith Thompson wrote: > luser droog <luser.droog@gmail.com> writes: > [...] > > You should read the first two chapters of Objected Oriented Programming > > with ANSI-C by Axel T Schreiner. [DELETED]/ooc.pdf > > That PDF is missing the first few introductory pages (it starts with > page v, Roman numeral 5). That's where I would expect the copyright > notice to be; I find the fact that it's missing highly suspicious. > I think your caution is well-founded but misplaced. The "~ats" in the URL is the author. ISTM not unlike offering draft papers without the final editing (for which the copyright is held by the publisher AIUI). The book itself is out of print (and no copies on Amazon). > The same site links to a copy of K&R, which is even more suspicious. > A German translation, copyright 1990 by the same publisher listed for the other texts.
[toc] | [prev] | [next] | [standalone]
| From | raltbos@xs4all.nl (Richard Bos) |
|---|---|
| Date | 2015-07-22 15:21 +0000 |
| Message-ID | <55afb4db.2719093@news.xs4all.nl> |
| In reply to | #66084 |
luser droog <luser.droog@gmail.com> wrote: > On Monday, July 20, 2015 at 4:00:50 PM UTC-5, Keith Thompson wrote: > > The same site links to a copy of K&R, which is even more suspicious. > > A German translation, copyright 1990 by the same publisher listed for > the other texts. And AFAICT that FTP site is down anyway. Richard
[toc] | [prev] | [next] | [standalone]
| From | janus <emekamicro@gmail.com> |
|---|---|
| Date | 2015-07-20 14:13 -0700 |
| Message-ID | <a01c182b-debe-4777-86c8-4bd9a30aa2af@googlegroups.com> |
| In reply to | #66046 |
On Monday, July 20, 2015 at 8:34:49 PM UTC+1, luser droog wrote: > On Monday, July 20, 2015 at 7:36:16 AM UTC-5, janus wrote: > > Hello All, > > > > > > I am going through a book and I stumbled on this class of memory allocation: > > > > void* p = calloc(1, class->size); > > > > *(const struct Class**) P = class; > > > > The last line is what is hard for me to understand. Why casting to pointer-to-pointer, and then dereference it immediately? My understanding is that struct Class is the first element in P struct, so by casting P struct by struct class, one immediately has access to the first element of the struct. This makes sense to me. But why using pointer-to-pointer? > > > > I was thinking that the same thing might be achieved by this: > > > > (const struct Class*) P = class; > > Regards, \Emeka > > You should read the first two chapters of Objected Oriented Programming > with ANSI-C by Axel T Schreiner. www.cs.rit.edu/~ats/books/ooc.pdf That is the book I am reading and that code was copied from it. the only error there is my change in capsize . On Monday, July 20, 2015 at 8:34:49 PM UTC+1, luser droog wrote: > On Monday, July 20, 2015 at 7:36:16 AM UTC-5, janus wrote: > > Hello All, > > > > > > I am going through a book and I stumbled on this class of memory allocation: > > > > void* p = calloc(1, class->size); > > > > *(const struct Class**) P = class; > > > > The last line is what is hard for me to understand. Why casting to pointer-to-pointer, and then dereference it immediately? My understanding is that struct Class is the first element in P struct, so by casting P struct by struct class, one immediately has access to the first element of the struct. This makes sense to me. But why using pointer-to-pointer? > > > > I was thinking that the same thing might be achieved by this: > > > > (const struct Class*) P = class; > > Regards, \Emeka > > You should read the first two chapters of Objected Oriented Programming > with ANSI-C by Axel T Schreiner. www.cs.rit.edu/~ats/books/ooc.pdf That is the book I am currently read and that is where I copied that code. However I erroneously changed capsize.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <nospam@nospam.nospam> |
|---|---|
| Date | 2015-07-20 14:54 -0700 |
| Message-ID | <mojqlt$ef8$1@speranza.aioe.org> |
| In reply to | #65971 |
> "janus" wrote in message > news:0591b244-c066-4714-afad-3ba8db4a8676@googlegroups.com... > I am going through a book and I stumbled on this class of memory > allocation: [...] An older scheme of mine: https://software.intel.com/en-us/forums/topic/300265 ;^)
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <nospam@nospam.nospam> |
|---|---|
| Date | 2015-07-20 14:57 -0700 |
| Message-ID | <mojqsg$es2$1@speranza.aioe.org> |
| In reply to | #66067 |
"Chris M. Thomasson" wrote in message news:mojqlt$ef8$1@speranza.aioe.org... > "janus" wrote in message > news:0591b244-c066-4714-afad-3ba8db4a8676@googlegroups.com... > I am going through a book and I stumbled on this class of memory > allocation: [...] An older scheme of mine: https://software.intel.com/en-us/forums/topic/300265 ;^) Another one: http://webpages.charter.net/appcore/vzoom/malloc/sergey_vzmem_thread.html
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.c
csiph-web