'*' after the decimal applies a little differently to strings.
Type: Posts; User: hamster_nz
'*' after the decimal applies a little differently to strings.
Compilers are very complex beasts, some of the most complex bits of software engineering, but don't let that discourage you! If I use the analogy of engineering, building a compiler could be thought...
It is very hard to give you a useful answer. There are too many unknowns, and it also depends on the compiler and it's optimizations. If you are using printf() it doesn't really matter as printf() is...
Once tested in C, it gets re-written into a hardware description language (HDL):
if rising_edge(clk) then
random <= s0 XOR s1 XOR s2;
s0 <= (s0(19 downto 1) &...
My needs are modest. I only wish that C's bit-level operations were more flexible. I work in an hardware R&D job so a good day's work is a lot of research and if there is some C code it is something...
I think in this case CRT is "the C Runtime", not "Cathode Ray Tube". But then again Google shows "Critical Race Theory" for CRT. A library that does I/O but doesn't build on the standard C library...
Traditionally DOS/Windows uses CR+LF as a line terminator, UNIX/Linux uses just the LF character.
Try just writing "Line 1\r\nLine 2\r\n" and see if it get what you are looking for, vs "Line...
The thing you are talking about is pretty common in lots of areas... Motor encoders, Gray counters, QPAM modulation, rotary encoders..
You have a sequence of pairs.
...
This might just be your lucky day! This is my own project, and it's written in C:
Full Stack GPS Receiver | Hackaday.io
Going from RF samples to a position fi..
There is so much that can be...
Hope it goes well... there is a big gap from the OS page size to the user friendly allocations.
There are quite a few challenges to get a high performance memory allocator. Alignment issues and...
As an over simplification, the malloc library maintains an ordered list of memory regions, that are either "in use" or "free".
When you free() a block of memory, it can be consolidated with any...
It calls the sbrk system call:
sbrk -
man pages section 2: System Calls
In some cases it can use mmap(), at least on Linux, if you are asking for really big chunks of memory.
Growing...
A few years ago when I was working on a RISC-V CPU design, I had this minimal bit of assembly to prepare the system to run test fixtures written in C:
.text
.align 2
.globl ...
I ask again... What is your desired endgame here?
You harp on about democracy, you have put it to a vote in your poll (not that internet or forum polls count for anything). Even if this forum was...
What is your desired endgame here? because the politics are not on your side - Salem has respect and support of others, and you are rapidly burning through yours.
I had a look back on some old...
(feeling aggrieved, might delete later :wink:)
No, I think Salem did the right thing.
There was no way that anybody could help you with your issue given the information you provided.
No...
If anybody is here looking for the "xDEADBEEF" idea, here it is:
Here's some bad code:
int main(void)
{
char *a;
a = my_malloc(17);
What is the difference between your release and debug builds? different #defines? different compiler options? Currently we have no idea!
Assuming it is only compiler options, then:
- you may...
Since all your allocation/reallocation/frees happens in one place why don't you:
- Always allocate 4 more bytes.
- Fill them with known magic values (e.g. 0xDE, 0xAD, 0xBE, 0xEF)
- Have...
How were they to know? Wasn't a "foo" or "bar" in sight...
Since you bring god into it:
Your project works in "debug mode" (by this I assume you mean with no optimizations), but not in "release mode" (optimizations turned on). If that is the case it is...
True, bit if they did manage to get things to compile, then they don't have warnings enabled, and this will definitely be an issue.
I always like to think the best of people unless proven...
I've looked past the code formatting...
Have a look at inputPhoneData()'s parameter:
void inputPhoneData(struct Phone* phone)
Now have a look at when you call it:
Try running with valgrind.
This brings back up what I was typing in a different thread:
In this case, that next person is might be you.
Shrug - If you don't want an opinion then why did you ask. "So yeah, this thread is just for opinions" were your exact words.
And you are right that I had to doublecheck that what I thought was...