Strainu onLine
Blogul unui automatist
1st
MAY
Zero-extent array members
Posted by Strainu | Filed under C
Some compilers, such as GCC or IBM’s compiler have a C extension that allows for a zero-extent array members of a structure to be declared:
//other members
char data[0];
};
They are very useful if you have a structure for a variable-length object. Until they are allocated the zero-extent members will not take up any memmory. When you have to allocate memory for such a structure, you can do it this way:
struct inode *ind = (struct inode*) malloc(sizeof(struct inode) + size_of_the_array);
You have to keep in mind that this is a language extension. The C99 standard only allows flexible array members, which are defined as
char array[];
(without the 0) and behave somewhat differently. You can find out more about the subject in the GCC Manual.
30th
JAN
Computer Systems’ Structure homeworks
Posted by Strainu | Filed under C, Python, Software
Computer Systems’ Structure homeworks from Automatics and Computer Science Faculty, 4th year, prof. Emil Sluşanschi. The archive contains a homework made in C. Themes: threads, semaphores, queues, locks, fat-tree inter-connection structures, file-sharing, network programming in python. The C homework is a simulation using the Blitzen simulator (not included).
(more…)
30th
Operating Systems homeworks
Posted by Strainu | Filed under C, Software
Operating Systems homeworks from the Automatics and Computer Science Faculty, 4th year, prof. Marius Dorian Zaharia. Themes:
- using Linux;
- bash;
- processes and threads in Linux;
- IPC: semaphores, message queues, signals, shared memory;
- readers-writers, producers-consumers and philosopher’s problems.
Tags: C/C++, Linux, Operating Systems, Poli, Software
12th
JUL
Networking Protocols homeworks
Posted by Strainu | Filed under C, Software
Networking Protocols homeworks Networking Protocols homeworks, Automatics and Computer Science Faculty, UPB, 3rd year, prof. Florin Pop or Valentin Cristea.
The software is distributed under CC-GNU GPL license.
29th
MAR
Algorithm Analysis Labs
Posted by Strainu | Filed under C, Software
Algorithm Analysis Labs (sorting methods and graph labs), Automatics and Computer Science Faculty, UPB, 3rd year, prof. Cristian Giumale
The software is distributed under CC-GNU GPL license.
Tags: Algorithm Analysis, C/C++, Poli, Software
26th
MAR
Algorithms and Data Structures Labs
Posted by Strainu | Filed under C, Software
Algorithms and Data Structures Labs Algorithms and Data Structures labs, Automatics and Computer Science Faculty, UPB, 1st year, prof. Florian Moraru
The software is distributed under CC-GNU GPL license.
26th
Computer Graphics Labs
Posted by Strainu | Filed under C, C++, Software
Computer Graphics Labs Computer Graphics labs (DOS-graphics and OpenGL), Automatics and Computer Science Faculty, UPB, 3rd year, prof. Marius Dorian Zaharia
The software is distributed under CC-GNU GPL license.
26th
C-Programming Labs
Posted by Strainu | Filed under C, Software
C-Programming Labs Computer Programming labs, Automatics and Computer Science Faculty, UPB, 1st year, prof. Eugenia Kalisz. (more…)
Recent Posts:
- 11 Jul Wikimania 2010 – zi...
- 10 Jul Wikimania 2010 – zi...
- 10 Jul Wikimania 2010 – zi...
- 09 Jul Wikimania 2010 – zi...
- 09 Jul Wikimania 2010 – da...
- 06 Jul Wikimania 2010 – da...
- 17 Jun Extended Weekend: Băile ...
- 11 Jun Extended Weekend: Prague
- 26 Apr Sondaj despre diacritice
- 03 Apr Cristopher Priest –...






