every millicsecond interrupt in xenomai domain on a am355x board can cause something wrong?

Philippe Gerum rpm at xenomai.org
Sun Dec 2 11:00:44 CET 2018


On 12/2/18 8:07 AM, 梁权 wrote:
> To simplify the problem, i do a test without QT like the following program:
> #define MALLOC_SIZE 8*1024*1024
> int main()
> {
> int err;
> char *addr=(char *)0;
> time_t now;
> struct tm *timenow;
> time(&now);
> timenow = localtime(&now);
> printf("%s\n", asctime(timenow));
> addr = (char *)malloc(MALLOC_SIZE);
> if (addr)
> printf("malloc ok\n");
> do
> {
> if (addr){
> memset(addr, 0x12, MALLOC_SIZE/2);
>                         memset(addr + MALLOC_SIZE/2, 0x34, MALLOC_SIZE/2);
> }
> usleep(1000);
> }while(1);
> return 0;
> }
> After i enable the interrupt for several minutes,  the error occur:
> root at am335x-evm:~/tmp# ./testMemset

Ok, thanks for investing time in creating this test snippet. I'll divert
some cycles in a few days to look into this.

-- 
Philippe.



More information about the Xenomai mailing list