Search:

Type: Posts; User: hamster_nz

Page 1 of 14 1 2 3 4

Search: Search took 0.01 seconds; generated 13 minute(s) ago.

  1. '*' after the decimal applies a little...

    '*' after the decimal applies a little differently to strings.
  2. Compilers are very complex beasts, some of the...

    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...
  3. It is very hard to give you a useful answer....

    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...
  4. Replies
    11
    Views
    1,654

    Once tested in C, it gets re-written into a...

    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) &...
  5. Replies
    11
    Views
    1,654

    My needs are modest. I only wish that C's...

    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...
  6. Replies
    11
    Views
    1,654

    I think in this case CRT is "the C Runtime", not...

    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...
  7. Replies
    11
    Views
    1,654

    Traditionally DOS/Windows uses CR+LF as a line...

    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...
  8. Replies
    8
    Views
    1,072

    The thing you are talking about is pretty common...

    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.
    ...
  9. This might just be your lucky day! This is my own...

    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...
  10. Replies
    12
    Views
    2,474

    Hope it goes well... there is a big gap from the...

    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...
  11. Replies
    12
    Views
    2,474

    As an over simplification, the malloc library...

    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...
  12. Replies
    12
    Views
    2,474

    It calls the sbrk system call: sbrk - man...

    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...
  13. A few years ago when I was working on a RISC-V...

    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 ...
  14. Poll: I ask again... What is your desired endgame here?...

    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...
  15. Poll: What is your desired endgame here? because the...

    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...
  16. Poll: (feeling aggrieved, might delete later :wink:) ...

    (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...
  17. If anybody is here looking for the "xDEADBEEF"...

    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);
  18. What is the difference between your release and...

    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...
  19. Since all your allocation/reallocation/frees...

    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...
  20. How were they to know? Wasn't a "foo" or "bar" in...

    How were they to know? Wasn't a "foo" or "bar" in sight...
  21. Since you bring god into it: Your project...

    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...
  22. True, bit if they did manage to get things to...

    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...
  23. I've looked past the code formatting... Have a...

    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:
  24. Try running with valgrind. This brings back up...

    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.
  25. Shrug - If you don't want an opinion then why did...

    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...
Results 1 to 25 of 344
Page 1 of 14 1 2 3 4