#include<stdio. h>
#include<ccblkf n.h>
#include<cdefbf 533.h> //BF533 Register Pointer Definition
#include<defbf5 33.h>
section("sdram0 _data")
float *p;
void main()
{
p=(float*)callo c(1000,sizeof(f loat));
if(p==NULL)
{
printf("Error allocating the Memory(1000)byt es\n");
}
else
{
printf("Memory( 1000)bytes allocated sucessfully\n") ;
free(p);
}
p=(float*)callo c(2000,sizeof(f loat));
if(p==NULL)
{
printf("Error allocating the Memory(2000)byt es\n");
}
else
{
printf("Memory( 2000)bytes allocated successfully\n" );
free(p);
}
p=(float*)callo c(2001,sizeof(f loat));
if(p==NULL)
{
printf("Error allocating the Memory(2001)byt es\n");
}
else
{
printf("Memory( 2001)bytes allocated successfully\n" );
free(p);
}
p=(float*)callo c(14780,sizeof( float));//for integer its failing at this point//
if(p==NULL)
{
printf("Error allocaing the Memory(14780)by tes\n");
}
else
{
printf("Memory( 14780)bytes allocated successfully\n" );
free(p);
}
}
}
#include<ccblkf n.h>
#include<cdefbf 533.h> //BF533 Register Pointer Definition
#include<defbf5 33.h>
section("sdram0 _data")
float *p;
void main()
{
p=(float*)callo c(1000,sizeof(f loat));
if(p==NULL)
{
printf("Error allocating the Memory(1000)byt es\n");
}
else
{
printf("Memory( 1000)bytes allocated sucessfully\n") ;
free(p);
}
p=(float*)callo c(2000,sizeof(f loat));
if(p==NULL)
{
printf("Error allocating the Memory(2000)byt es\n");
}
else
{
printf("Memory( 2000)bytes allocated successfully\n" );
free(p);
}
p=(float*)callo c(2001,sizeof(f loat));
if(p==NULL)
{
printf("Error allocating the Memory(2001)byt es\n");
}
else
{
printf("Memory( 2001)bytes allocated successfully\n" );
free(p);
}
p=(float*)callo c(14780,sizeof( float));//for integer its failing at this point//
if(p==NULL)
{
printf("Error allocaing the Memory(14780)by tes\n");
}
else
{
printf("Memory( 14780)bytes allocated successfully\n" );
free(p);
}
}
}
Comment