ROCINHA may be the meanest of Rio de Janeiro's 400 slums -- favelas. Home to more than 80,000 people, its hovels of wood and block spill chaotically over the "Two Brothers," the city's landmark twin peaks, and from their heights overlook a beachfront of luxury apartment buildings and hotels.

The buildings on hillside and beach are the legacy of Brazil's breathtaking economic growth in the 1970s: as the country prospered, peasants seeking refuge from rural poverty streamed into the cities. Despite the recession that followed, the peasants have continued to come. In 20 years, the number of favelados in Rio has grown by 300 percent, while the nonslum population has grown by only 10 percent. Today, perhaps a million of the greater city's 8 million inhabitants live in slums.

In Rocinha, which means "little farm" in Portuguese, families of 10 may share two-room hovels, and the average salary is less than $90 a month. Most of Brazil's 13 million underemployed are favelados, legions of whom are vendors peddling everything from sweets to car parts to shoeshines.

By the time they are 5 years old, children may be on the streets to supplement family income. Because Rocinha's one public school can accommodate only 20 percent of the slum's children, parents created informal classrooms. In one, pupils wrote their own text, in which violence, abandonment, illness, broken homes and poverty are almost casual themes.

An array of busy merchants inhabits Rocinha's slopes. Mom-and-pop stores sell a variety of household goods, and bars, or botequims, do a brisk business in soft drinks, beer and cane spirits. The grocers and bar owners, who often command usurers' interest rates for their wares, are the well-to-do here.

Once, the government's approach to the growing social problems of favelas was to bulldoze it away. Now, plans call for "urbanizing" the slums, and some have electricity, running water, tenants' associations, schools and community centers. Still, the welfare of the favelados depends largely on the vagaries of politics, and most politicians venture along the slums' twisting footpaths only to campaign. Otherwise, Rio's favelados fend for themselves as they look from their heights on the splendor far below.