Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Probably your issue is that <code>size_t</code> isn't the same as <code>int</code> on your platform, or <code>size_t</code> isn't specified correctly at all. The pointer types should be OK (technically, they should match too, but on most systems <code>sizeof(char*) == sizeof(void*)</code>).</p> <p>If you're developing your own kernel, you'd want to write your own <code>system.h</code>. If you're writing both <code>system.h</code> and <code>main.c</code>, you can make them match up however you'd like. If you look at <a href="http://www.osdever.net/bkerndev/Docs/creatingmain.htm" rel="noreferrer">this page of the tutorial</a>, you'd see that header and C source both declare <code>memcpy</code> as:</p> <pre><code>unsigned char *memcpy(unsigned char *dest, const unsigned char *src, int count); </code></pre> <p>But if you download the example source files at the end of the tutorial, you find it is instead:</p> <pre><code>void *memcpy(void *dest, const void *src, size_t count); </code></pre> <p>Looking at the top of that file, you find the following comment:</p> <pre><code>/* bkerndev - Bran's Kernel Development Tutorial * By: Brandon F. (friesenb@gmail.com) * Desc: Main.c: C code entry. * * Notes: No warranty expressed or implied. Use at own risk. */ </code></pre> <p>It doesn't look like you're trying to follow a tutorial, but rather that you're trying to cut and paste code from a tutorial. That's like trying to learn to perform brain surgery by following along in a book. You might get it to work, but if you don't really understand what you're doing... well, please do the world a favor and don't use it for anything critical.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload