Lee H. Marzke on 5 Oct 2018 14:46:32 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Anyone Experienced with C Pointers?


The stack description would only be accurate for the Java stack or other OS with
dynamic memory allocation.

In embedded C,  pointers can address any memory location,  and you can use array notation
or a pointer ( whichever you want ).  The OS doesn't  manage memory and there
is no dynamic memory allocation. ( no heap ),  but there is a stack,  and you can
manipulate items on the stack via pointers as well.

With Linux and GCC , etc. there may be various calling conventions depending on the
language used , etc. so it is even more complicated.

Lee


----- Original Message -----
> From: "Ron Guilmet" <ronpguilmet@gmail.com>
> To: "Philadelphia Linux User's Group Discussion List" <plug@lists.phillylinux.org>
> Sent: Friday, 5 October, 2018 17:19:22
> Subject: [PLUG] Anyone Experienced with C Pointers?

> I have been working with writing a device driver for my HP laptop. The
> wireless doesn't work well. I think it is an antenna selection issue.
> The laptop any distro shows about 10% on the wifi even when you are 10
> feet away.
> 
> That said, I've been refreshing myself with C. Pointers is one of those
> areas that seem to give everyone a hard road to hoe. Sometimes a high
> overview helps. I wanted to present what my understanding is, and I was
> hoping someone could elaborate on it.
> 
> My understanding of pointer use is the following. I understand there
> are different sections of memory. A section for the code, a section for
> the running app called the stack, and then your free or available
> memory called the heap. I understand that if the running program needs
> more memory, it has to access the heap, and the heap can only be
> addressed by memory addresses. Does that sound about right?
> 
> Rom
> 
> ___________________________________________________________________________
> Philadelphia Linux Users Group         --        http://www.phillylinux.org
> Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
> General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug

-- 
"Between subtle shading and the absence of light lies the nuance of iqlusion..." - Kryptos 

Lee Marzke, lee@marzke.net http://marzke.net/lee/ 
IT Consultant, VMware, VCenter, SAN storage, infrastructure, SW CM 

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug