unsigned long -ot eszik kernel beli mmap , de ez most mindegy. a kód helyes jelen formájában. fd változóm meg long tipusú volt.