The relentless surge in memory chip prices over the past few months has driven a vast divide between winners and losers in the stock market, and investors don’t see any end in sight.

Companies from game console maker Nintendo and big PC brands to Apple suppliers are seeing shares slump on profitability concerns. Memory producers, meanwhile, are soaring to unprecedented heights. Money managers and analysts are now assessing which firms can best navigate the squeeze by locking in supply, raising product prices or redesigning to use less memory.

The market had already been bracing for it: a Bloomberg gauge of global consumer electronics makers is down 12% since the end of September while a basket of memory makers including Samsung Electronics has surged more than 160%. The question is how much is priced in.