<commit_before>#include "header.h"

void *mallocblocks(page_context_t *c,int blocks)
{
    if(blocks>1024)
    {
        return 0;
    }
    char tmp=0;
    int i,j,k;
    for(i=0x10;i<0x10000;i++)
    {
        if(((uint32_t)c->pagedir[i/1024])&1)
        {
            for(j=0;j<1024-blocks;j++)
            {
                for(tmp=k=0;k<blocks&&!tmp;k++)
                {
                    if(((uint32_t)c->pagedir[i/1024][j+k])&1)
                    {
                        tmp=1;
                    }
                }
                if(!tmp)
                {
                    for(k=0;k<blocks&&tmp;k++)
                    {
                        page_map(c,(uint32_t)((i*1024+j+k)<<12),(uint32_t)physmallocblock(),PTE_PRESENT|PTE_WRITE);
                    }
                    printf("%x\n",c->pagedir[i/1024][j+k]);
                    return (void *)((i*1024+j+k)<<12); //(void *)(((uint32_t)c->pagedir[i/1024][j+k])&~0xFFF);
                }
            }
        }
    }
    for(i=0x10;i<0x10000;i++)
    {
        if(!(((uint32_t)c->pagedir[i/1024])&1))
        {
            c->pagedir[i/1024]=(pagetable_t)(((uint32_t)physmallocblock())|PTE_PRESENT);
            page_map(c,((i<<10)<<12),((i<<10)<<12),PTE_PRESENT|PTE_WRITE);
/*          
            {
                page_map(c,(uint32_t)((i*1024+j)<<12),(uint32_t)physmallocblock(),PTE_PRESENT|PTE_WRITE);
            }
*/
//            printf("%x\n",c->pagedir[i/1024]);
            return mallocblocks(c,blocks);
        }
    }
    return 0;
}
<commit_msg>commented output!<commit_after>#include "header.h"

void *mallocblocks(page_context_t *c,int blocks)
{
    if(blocks>1024)
    {
        return 0;
    }
    char tmp=0;
    int i,j,k;
    for(i=0x10;i<0x10000;i++)
    {
        if(((uint32_t)c->pagedir[i/1024])&1)
        {
            for(j=0;j<1024-blocks;j++)
            {
                for(tmp=k=0;k<blocks&&!tmp;k++)
                {
                    if(((uint32_t)c->pagedir[i/1024][j+k])&1)
                    {
                        tmp=1;
                    }
                }
                if(!tmp)
                {
                    for(k=0;k<blocks&&tmp;k++)
                    {
                        page_map(c,(uint32_t)((i*1024+j+k)<<12),(uint32_t)physmallocblock(),PTE_PRESENT|PTE_WRITE);
                    }
//                    printf("%x\n",c->pagedir[i/1024][j+k]);
                    return (void *)((i*1024+j+k)<<12); //(void *)(((uint32_t)c->pagedir[i/1024][j+k])&~0xFFF);
                }
            }
        }
    }
    for(i=0x10;i<0x10000;i++)
    {
        if(!(((uint32_t)c->pagedir[i/1024])&1))
        {
            c->pagedir[i/1024]=(pagetable_t)(((uint32_t)physmallocblock())|PTE_PRESENT);
            page_map(c,((i<<10)<<12),((i<<10)<<12),PTE_PRESENT|PTE_WRITE);
/*          
            {
                page_map(c,(uint32_t)((i*1024+j)<<12),(uint32_t)physmallocblock(),PTE_PRESENT|PTE_WRITE);
            }
*/
//            printf("%x\n",c->pagedir[i/1024]);
            return mallocblocks(c,blocks);
        }
    }
    return 0;
}

{'fraction_non_alphanumeric': 0.1933505487411233, 'fraction_numerical': 0.07036797934151065, 'mean_word_length': 1.447867298578199, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1498713', 'n_tokens_mistral': 1319, 'n_tokens_neox': 1148, 'n_words': 77}